@Test
public void testDeleteUser() {

    HttpServletRequest request = mock(HttpServletRequest.class);
    User user = new User("identifier", "identity");
    Long version = new Long(0);
    ClientIdParameter clientId = new ClientIdParameter();
    when(serviceFacade.deleteUser(eq(user.getIdentifier()), any(RevisionInfo.class))).thenReturn(user);
    tenantResource.removeUser(request, new LongParameter(version.toString()), clientId, user.getIdentifier());
    verify(serviceFacade).deleteUser(eq(user.getIdentifier()), any(RevisionInfo.class));
    verify(eventService).publish(eq(EventFactory.userDeleted(user)));
}