@Test
@SuppressWarnings( "unchecked" )
public void updateUserGroupsSameUser()
{

    currentUser.setId( 1001 );
    currentUser.setUid( "def2" );
    User currentUser2 = new User();
    currentUser2.setId( 1001 );
    currentUser2.setUid( "def2" );
    Mockito.when( userService.getUser( "def2" ) ).thenReturn( user );
    Mockito.when( currentUserService.getCurrentUser() ).thenReturn( currentUser2 );
    final TypeReport typeReport = new TypeReport( User.class );
    typeReport.getStats().incUpdated();
    final ImportReport importReport = new ImportReport();
    importReport.setStatus( Status.OK );
    importReport.addTypeReport( typeReport );
    if ( importReport.getStatus() == Status.OK && importReport.getStats().getUpdated() == 1 )
    {
        userController.updateUserGroups( "def2", parsedUser, currentUser );
    }
    Mockito.verify( currentUserService ).getCurrentUser();
    Mockito.verifyNoMoreInteractions( currentUserService );
    Mockito.verify( userGroupService ).updateUserGroups( Mockito.same( user ),
        (Collection<String>) argThat( Matchers.containsInAnyOrder( "abc1", "abc2" ) ),
        Mockito.same( currentUser2 ) );
}