in component-test/src/main/java/org/apache/fineract/cn/customer/CustomerApiDocumentation.java [1457:1517]
public void documentDeletePortrait ( ) throws Exception {
final Customer customer = CustomerGenerator.createRandomCustomer();
DateOfBirth dateOfBirth = new DateOfBirth();
dateOfBirth.setYear(Integer.valueOf(1994));
dateOfBirth.setMonth(Integer.valueOf(5));
dateOfBirth.setDay(Integer.valueOf(5));
Address address = new Address();
address.setStreet("Nwah");
address.setCity("Nkambe");
address.setRegion("NWR");
address.setPostalCode("8050");
address.setCountryCode("CM");
address.setCountry("Cameroon");
ContactDetail orangeContact = new ContactDetail();
orangeContact.setType(ContactDetail.Type.MOBILE.name());
orangeContact.setGroup(ContactDetail.Group.PRIVATE.name());
orangeContact.setValue("699420043");
orangeContact.setPreferenceLevel(Integer.valueOf(1));
orangeContact.setValidated(Boolean.FALSE);
ContactDetail nextellContact = new ContactDetail();
nextellContact.setType(ContactDetail.Type.MOBILE.name());
nextellContact.setGroup(ContactDetail.Group.PRIVATE.name());
nextellContact.setValue("666737226");
nextellContact.setPreferenceLevel(Integer.valueOf(2));
nextellContact.setValidated(Boolean.FALSE);
List <ContactDetail> contactDetails = new ArrayList <>();
contactDetails.add(nextellContact);
contactDetails.add(orangeContact);
customer.setIdentifier("shey");
customer.setType(Customer.Type.PERSON.name());
customer.setGivenName("Shey");
customer.setMiddleName("Sembe");
customer.setSurname("Waba.");
customer.setDateOfBirth(dateOfBirth);
customer.setMember(Boolean.TRUE);
customer.setAssignedOffice("Nwah Sq");
customer.setAssignedEmployee("Waba Mala");
customer.setAddress(address);
customer.setContactDetails(contactDetails);
customer.setCurrentState(Customer.State.PENDING.name());
customer.setAccountBeneficiary("wife");
customer.setReferenceCustomer("wirba");
customer.setApplicationDate(LocalDate.ofYearDay(2017, 98).toString());
customer.setLastModifiedBy("Waba Mala");
customer.setLastModifiedOn(LocalDate.ofYearDay(2018, 12).toString());
this.customerManager.createCustomer(customer);
this.eventRecorder.wait(CustomerEventConstants.POST_CUSTOMER, customer.getIdentifier());
this.mockMvc.perform(delete("/customers/" + customer.getIdentifier() + "/portrait")
.accept(MediaType.ALL_VALUE)
.contentType(MediaType.APPLICATION_JSON_VALUE))
.andExpect(status().isAccepted())
.andDo(document("document-delete-portrait", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint())));
}