FilePath { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final FilePath other = (FilePath) obj; return Objects.equals(this.commitId, other.commitId) && Objects.equals(this.fileId, other.fileId); } FilePath(Integer commitId, Integer fileId, String filePath); Integer getCommitId(); Integer getFileId(); String getFilePath(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testEquals() { FilePath equal = new FilePath(1000, 10, "Test.java"); boolean result = instance.equals(equal); assertEquals(true, result); assertEquals(instance.hashCode(), equal.hashCode()); }