in component-test/src/main/java/org/apache/fineract/cn/office/TestEmployee.java [180:197]
public void shouldNotUpdateEmployeeCodeMismatch() throws Exception {
final Employee employee = EmployeeFactory.createRandomEmployee();
this.organizationManager.createEmployee(employee);
this.eventRecorder.wait(EventConstants.OPERATION_POST_EMPLOYEE, employee.getIdentifier());
final String originalCode = employee.getIdentifier();
employee.setIdentifier(RandomStringUtils.randomAlphanumeric(8));
try {
this.organizationManager.updateEmployee(originalCode, employee);
Assert.fail();
} catch (final BadRequestException ex) {
// do nothing, expected
}
this.organizationManager.deleteEmployee(originalCode);
this.eventRecorder.wait(EventConstants.OPERATION_DELETE_EMPLOYEE, originalCode);
}