@Override public Faculty merge(Faculty entity) { if (entity.getID() != null) { return facultyRepository.save(entity); } return null; }
@Test public void testUpdate() throws Exception { Faculty fac = new Faculty.Builder().FacultyID(101).Name("Informatics And Design").build(); Assert.assertEquals(fac.getName(), "Informatics And Design"); }
// TODO add test methods here. // The methods must be annotated with annotation @Test. For example: // @Test public void testCreation() throws Exception { Faculty fac = new Faculty.Builder().FacultyID(101).Name("ND: Information Technology").build(); Assert.assertEquals(fac.getFacultyID(), 101); }