guys i have this service
public class DepartmentServiceImpl implements DepartmentService { @Autowired private DepartmentDao departmentDao; //... other functions @Override public Department getDepartment(int depid) { return departmentDao.getDepartment(depid); } } and my test unit is
Department department = new Department(); @Autowired private DepartmentDao myDao; @Autowired private DepartmentService service; @Test public void testGetDepartment(){ department.setDepId(111); department.setDepName("merna"); assertEquals(department, service.getDepartment(111)); } but it gives me
java.lang.AssertionError: expected:<com.dineshonjava.model.Department@f9b5552> but was:<com.dineshonjava.model.Department@4d4960c8> any help ??
Departmentclass overrideequals()?