@Test
public void testUpdateUserGroup() {

    HttpServletRequest request = mock(HttpServletRequest.class);
    RevisionInfo revisionInfo = new RevisionInfo("client1", 1L);
    UserGroup userGroup = new UserGroup("identifier", "new-identity");
    userGroup.setRevision(revisionInfo);
    when(serviceFacade.updateUserGroup(userGroup)).thenReturn(userGroup);
    tenantResource.updateUserGroup(request, userGroup.getIdentifier(), userGroup);
    verify(serviceFacade).updateUserGroup(userGroup);
    verify(eventService).publish(eq(EventFactory.userGroupUpdated(userGroup)));
}