@Inject
private StudentModuleDao studentModuleDao;
@Test
public void test() {
StudentModule studentModule = studentModuleDao.create();
Qualificationgroup qualificationgroup1 = new Qualificationgroup();
qualificationgroup1.setMax_ects(82);
qualificationgroup1.setMin_ects(74);
qualificationgroup1.setName("A");
Module module1 = new Module();
module1.setEcts(4);
module1.setQualificationgroup(qualificationgroup1);
module1.setName("Ergonomie und Psychologie");
module1.setNumber(7083);
studentModule.setModule(module1);
StudentModule managedStudentModule = studentModuleDao
.update(studentModule);
StudentModule foundStudentModule = studentModuleDao
.read(managedStudentModule.getId());
Assert.assertTrue(studentModule.getModule().getName()
.equalsIgnoreCase(foundStudentModule.getModule().getName()));
studentModuleDao.delete(foundStudentModule);
}