}
@Test
public void associatePasswordWithUser() {
PasswordManager pm = new PasswordManager();
pm.setEntityManager(em);
UserManager um = new UserManager();
um.setEntityManager(em);
FireUser oscar = TestUtil.createRandomUser();
em.getTransaction().begin();
um.create(oscar);
em.getTransaction().commit();
FireUser u5 = um.read(oscar.getId());
assertNotNull(u5);
String smart = "haxx";
Password oscarsPassword = new Password(oscar.getId(), smart);
em.getTransaction().begin();
pm.create(oscarsPassword);
em.getTransaction().commit();
assertNotNull(pm.findPassword(oscar, smart));
assertNull(pm.findPassword(oscar, "ohack"));
}