@Test
public void testDeleteUser()
{

    User userA = createUser( 'A' );
    User userB = createUser( 'B' );
    userService.addUser( userA );
    userService.addUser( userB );
    dashboardItem.getUsers().add ( userA );
    dashboardItem.getUsers().add ( userA ); // Test removing duplicates
    dashboardItem.getUsers().add ( userB );
    dashboardService.saveDashboard( dashboard );
    assertEquals(1, dashboardService.getUserDashboardItems( userA ).size() );
    assertEquals(1, dashboardService.getUserDashboardItems( userB ).size() );
    assertEquals( 1, dashboard.getItemCount() );
    userService.deleteUser( userA );
    assertEquals(0, dashboardService.getUserDashboardItems( userA ).size() );
    assertEquals(1, dashboardService.getUserDashboardItems( userB ).size() );
    assertEquals( 1, dashboard.getItemCount() );
    userService.deleteUser( userB );
    assertEquals(0, dashboardService.getUserDashboardItems( userA ).size() );
    assertEquals(0, dashboardService.getUserDashboardItems( userB ).size() );
    assertEquals( 0, dashboard.getItemCount() );
}