@Inject
private StudentDao studentDao;
@Test
public void test() {
Student student = studentDao.create();
student.setName("Müller");
student.setPrename("Hugo");
student.setLogin("hm");
student.setPassword("123456");
List<StudentModule> listSM = new ArrayList<StudentModule>();
listSM.add(new StudentModule());
listSM.add(new StudentModule());
student.setStudentModules(listSM);
Student managedStudent = studentDao.update(student);
Student foundStudent = studentDao.read(managedStudent.getId());
Assert.assertTrue(student.getPrename()
.equals(foundStudent.getPrename()));
Assert.assertTrue(student.getPassword().equals(
foundStudent.getPassword()));
Assert.assertTrue(student.getLogin().equals(foundStudent.getLogin()));
foundStudent.getLogin();
foundStudent.getPrename();
foundStudent.getPassword();
studentDao.delete(foundStudent);
}