@Test
public void testUserIsNameNotOneOf() throws Exception {

    User user1 = _userRepo.save(newUser(_inc));
    final User user2 = newUser(_inc);
    _userRepo.save(user2);
    final Specification<User> spec = userIsNameNotOneOf(Arrays.asList(new String[]{user1.getUsername()}));
    final List<User> found = _userRepo.findAll(spec);
    assertEquals(1, found.size());
    assertEquals(user1.getId(), found.get(0).getId());
    assertEquals(0, _userRepo.findAll(userIsNameNotOneOf(Arrays.asList(new String[]{"1", "2"}))).size());
    assertEquals(2, _userRepo.findAll(userIsNameNotOneOf(Arrays.asList(new String[]{user1.getUsername(),
        user2.getUsername()}))).size());
    assertEquals(1, _userRepo.findAll(userIsNameNotOneOf(Arrays.asList(new String[]{user1.getUsername(),
        user1.getUsername()}))).size());
}