Student implements Serializable { public void copyBusinessFieldsFrom(Student student) { this.setAddress(student.getAddress()); this.setBirthDate(student.getBirthDate()); this.setLastName(student.getLastName()); this.setFirstName(student.getFirstName()); this.setPhoneNumber(student.getPhoneNumber()); this.setGender(student.getGender()); } Student();  Student(final String lastName, final String firstName, final Date birthDate, PhoneNumber phone); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); Long getId(); final PhoneNumber getPhoneNumber(); final void setPhoneNumber(final PhoneNumber pPhoneNumber); final String getLastName(); final void setLastName(final String pLastName); final String getFirstName(); final void setFirstName(final String pFirstName); final Date getBirthDate(); final void setBirthDate(final Date pBirthDate); final Gender getGender(); final void setGender(final Gender pGender); final Address getAddress(); final void setAddress(final Address pAddress); final byte[] getPicture(); void setPicture(final byte[] pPicture); void setId(Long id); Integer getStudentId(); void setStudentId(Integer studentId); void copyBusinessFieldsFrom(Student student);  }
@Test public void shouldCopyFromStudentBeEqualToSource() { Student s1 = new Student("Steve", "Hostettler", new Date(), new PhoneNumber("+33698075273")); Student s2 = new Student("John", "Doe", new Date(), new PhoneNumber("+33698075273")); s1.copyBusinessFieldsFrom(s2); Assert.assertEquals("s1=s2", s1, s2); }