in component-test/src/main/java/org/apache/fineract/cn/office/TestEmployee.java [62:77]
public void shouldNotCreateEmployeeAlreadyExists() throws Exception {
final Employee employee = EmployeeFactory.createRandomEmployee();
this.organizationManager.createEmployee(employee);
this.eventRecorder.wait(EventConstants.OPERATION_POST_EMPLOYEE, employee.getIdentifier());
try {
this.organizationManager.createEmployee(employee);
Assert.fail();
} catch (final AlreadyExistsException ex) {
// do nothing, expected
}
this.organizationManager.deleteEmployee(employee.getIdentifier());
this.eventRecorder.wait(EventConstants.OPERATION_DELETE_EMPLOYEE, employee.getIdentifier());
}