assertEquals(u1, image.getUser());
}
public void testHasMany() 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);
IPostPersistence posts = dbs.getDatabase1().posts();
Post p1 = posts.create("title1", System.currentTimeMillis(), (int)u1.getId(), 0l);
Post p2 = posts.create("title2", System.currentTimeMillis(), (int)u1.getId(), 0l);
Post p3 = posts.create("title3", System.currentTimeMillis(), (int)u1.getId(), 0l);
assertEquals(new HashSet<Post>(Arrays.asList(p1, p2, p3)), u1.getPosts());
}