in component-test/src/main/java/org/apache/fineract/cn/group/TestGroup.java [200:217]
public void shouldUpdateAssignedEmployee ( ) throws Exception {
final GroupDefinition randomGroupDefinition = GroupDefinitionGenerator.createRandomGroupDefinition();
this.testSubject.createGroupDefinition(randomGroupDefinition);
this.eventRecorder.wait(EventConstants.POST_GROUP_DEFINITION, randomGroupDefinition.getIdentifier());
final Group randomGroup = GroupGenerator.createRandomGroup(randomGroupDefinition.getIdentifier());
this.testSubject.createGroup(randomGroup);
this.eventRecorder.wait(EventConstants.POST_GROUP, randomGroup.getIdentifier());
final AssignedEmployeeHolder anotherEmployee = new AssignedEmployeeHolder();
anotherEmployee.setIdentifier(RandomStringUtils.randomAlphanumeric(32));
this.testSubject.updateAssignedEmployee(randomGroup.getIdentifier(), anotherEmployee);
this.eventRecorder.wait(EventConstants.PUT_GROUP, randomGroup.getIdentifier());
final Group fetchedGroup = this.testSubject.findGroup(randomGroup.getIdentifier());
Assert.assertEquals(anotherEmployee.getIdentifier(), fetchedGroup.getAssignedEmployee());
}