assertEquals(Collections.singleton(u2), users.findAll("(created_at_millis IS NULL) IS TRUE"));
}
public void testFindAllWithLikeConditions() throws Exception {
IUserPersistence users = dbs.getDatabase1().users();
User u1 = users.create("bryand", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);
User u2 = users.create("thomask", null, 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);
User u3 = users.create("as%df", null, 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);
assertEquals(Collections.singleton(u1), users.findAll("handle LIKE 'bryan_'"));
assertEquals(Collections.singleton(u2), users.findAll("handle LIKE '%o%m%as%'"));
assertEquals(Collections.singleton(u2), users.findAll("handle NOT LIKE 'bryan_' AND handle != 'as%df'"));
assertEquals(Collections.singleton(u1), users.findAll("handle NOT LIKE '%omas%' AND handle != 'as%df'"));