in component-test/src/main/java/org/apache/fineract/cn/office/TestOffice.java [57:70]
public void shouldNotCreateOfficeDuplicate() throws Exception {
final Office office = OfficeFactory.createRandomOffice();
this.organizationManager.createOffice(office);
this.eventRecorder.wait(EventConstants.OPERATION_POST_OFFICE, office.getIdentifier());
try {
this.organizationManager.createOffice(office);
Assert.fail();
} catch (final AlreadyExistsException ex) {
// do nothing, expected
}
this.organizationManager.deleteOffice(office.getIdentifier());
this.eventRecorder.wait(EventConstants.OPERATION_DELETE_OFFICE, office.getIdentifier());
}