in component-test/src/main/java/org/apache/fineract/cn/rhythm/RhythmApiDocumentation.java [247:270]
public void documentSetClockOffset ( ) throws InterruptedException {
final LocalDateTime now = LocalDateTime.now(ZoneOffset.ofHours(6));
ClockOffset clockOffset = new ClockOffset(now.getHour(), now.getMinute(), now.getSecond());
Gson gson = new Gson();
try {
this.mockMvc.perform(put("/clockoffset")
.accept(MediaType.ALL_VALUE)
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(gson.toJson(clockOffset))
.header(TENANT_HEADER, tenantDataStoreContext.getTenantName()))
.andExpect(status().isAccepted())
.andDo(document(
"document-set-clockoffset", preprocessRequest(prettyPrint()),
requestFields(
fieldWithPath("hours").type("Integer").description("Clock Offset Hour"),
fieldWithPath("minutes").type("Integer").description("Clock Offset Minutes"),
fieldWithPath("seconds").type("Integer").description("Clock Offset Seconds")
)
));
} catch (Exception e) {
e.printStackTrace();
}
}