in component-test/src/main/java/org/apache/fineract/cn/customer/IdentificationApiDocumentation.java [341:368]
public void documentFindScan ( ) throws Exception {
final Customer customer = CustomerGenerator.createRandomCustomer();
customer.setIdentifier("checko");
this.customerManager.createCustomer(customer);
this.eventRecorder.wait(CustomerEventConstants.POST_CUSTOMER, customer.getIdentifier());
final String customerIdentifier = customer.getIdentifier();
final IdentificationCard identificationCard = IdentificationCardGenerator.createRandomIdentificationCard();
identificationCard.setNumber("SM23A4321");
this.customerManager.createIdentificationCard(customerIdentifier, identificationCard);
this.eventRecorder.wait(CustomerEventConstants.POST_IDENTIFICATION_CARD, identificationCard.getNumber());
final String identificationCardNumber = identificationCard.getNumber();
final IdentificationCardScan scan = this.createScan(customerIdentifier, identificationCardNumber, "soughtOut", "Found Scan");
Gson gson = new Gson();
this.mockMvc.perform(get("/customers/" + customerIdentifier
+ "/identifications/" + identificationCardNumber + "/scans/" + scan.getIdentifier())
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(gson.toJson(scan))
.accept(MediaType.ALL_VALUE))
.andExpect(status().isOk())
.andDo(document("document-find-scan", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint()),
responseFields(
fieldWithPath("identifier").description("scan's identifier"),
fieldWithPath("description").description("scan's description"))));
}