@Test
@Transactional
public void testAddAndGetMaterialCategories() {
/* Build materialCategory (0 constraint violations). */
// Missing material name and the unit type.
MaterialDTO m1 = new MaterialDTO(null, new BigDecimal(13),
getUnitTypeCodeA(), true);
// Missing default unit price
MaterialDTO m2 = new MaterialDTO("material 2", null, getUnitTypeCodeA(),
true);
// Missing unit type
MaterialDTO m3 = new MaterialDTO("material 3", new BigDecimal(13),
null, true);
// Missing unit type, same name
MaterialDTO m4 = new MaterialDTO("material 3", new BigDecimal(13),
getUnitTypeCodeA(), null);
List<MaterialDTO> materialDTOs = new ArrayList<MaterialDTO>();
materialDTOs.add(m1);
materialDTOs.add(m2);