IQualityFormDAO qualityFormDAO;
@Test
@Transactional
public void checkInvalidNameQualityForm() throws ValidationException {
QualityForm qualityForm = createValidQualityForm();
qualityForm.setName("");
try {
qualityFormDAO.save(qualityForm);
fail("It should throw an exception");
} catch (ValidationException e) {
// It should throw an exception
}
qualityForm.setName(null);
try {
qualityFormDAO.save(qualityForm);
fail("It should throw an exception");
} catch (ValidationException e) {
// It should throw an exception