in component-test/src/main/java/org/apache/fineract/cn/office/OfficeApiDocumentation.java [71:90]
public void documentCreateOffice ( ) throws Exception {
final Office office = OfficeFactory.createRandomOffice();
office.setIdentifier("Kigali");
office.setName("Kigali And Sons MFI");
office.setDescription("Sons Of Kigali MFI");
this.organizationManager.createOffice(office);
this.eventRecorder.wait(EventConstants.OPERATION_POST_OFFICE, office.getIdentifier());
Gson gson = new Gson();
this.mockMvc.perform(post("/employees")
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(gson.toJson(office)))
.andExpect(status().isAccepted())
.andDo(document("document-create-office", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint()),
requestFields(
fieldWithPath("identifier").description("Employee's identifier"),
fieldWithPath("name").description(" Employee given name"),
fieldWithPath("description").description("Employee's middle name"))));
}