Project implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof Project)) return false; Project other = (Project) obj; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; } Project();  Project(String name); String getName(); void setName(String name); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testEquals() { project.setName("bla"); assertTrue(project.equals(new Project("bla"))); }