assertEquals(3.4, notBryand_again.getSomeDecimal());
assertTrue(notBryand_again.isSomeBoolean());
}
public void testFindSetFromCache() throws Exception {
IUserPersistence users = dbs.getDatabase1().users();
long t0 = System.currentTimeMillis();
long t1 = t0 + 10;
long t2 = t0 + 20;
byte[] someBinary = new byte[]{5, 4, 3, 2, 1};
User bryand = users.create("bryand", t0, 5, t1, t2, "this is a relatively long string", someBinary, 1.2d, 3.4d, true);
User notBryand = users.create("notBryand", t0, 3, t1, t2, "another relatively long string", someBinary, 1.2d, 3.4d, true);
users.create("unwanted", t0, 0, t1, t2, "yet another relatively long string", someBinary, 1.2d, 3.4d, true);
Set<Long> keysToSearch = new HashSet<Long>();
keysToSearch.add(bryand.getId());
keysToSearch.add(notBryand.getId());
Set<User> foundValues = users.find(keysToSearch);
assertEquals(2, foundValues.size());
Iterator<User> iter = foundValues.iterator();
User bryand_again = users.find(bryand.getId());
User notBryand_again = users.find(notBryand.getId());
while (iter.hasNext()) {
User curUser = iter.next();
if (curUser.getId() == bryand.getId()) {
assertEquals(bryand_again, curUser);
} else if (curUser.getId() == notBryand.getId()) {