in component-test/src/main/java/org/apache/fineract/cn/office/TestOffice.java [204:221]
public void shouldDeleteAddressOfOffice() throws Exception {
final Office office = OfficeFactory.createRandomOffice();
final Address address = AddressFactory.createRandomAddress();
office.setAddress(address);
this.organizationManager.createOffice(office);
this.eventRecorder.wait(EventConstants.OPERATION_POST_OFFICE, office.getIdentifier());
final Address savedAddress = this.organizationManager.getAddressOfOffice(office.getIdentifier());
Assert.assertNotNull(savedAddress);
this.organizationManager.deleteAddressOfOffice(office.getIdentifier());
this.eventRecorder.wait(EventConstants.OPERATION_DELETE_ADDRESS, office.getIdentifier());
Assert.assertNull(this.organizationManager.getAddressOfOffice(office.getIdentifier()));
this.organizationManager.deleteOffice(office.getIdentifier());
this.eventRecorder.wait(EventConstants.OPERATION_DELETE_OFFICE, office.getIdentifier());
}