### Question:
JiraVertex extends Vertex { @Override public int hashCode() { return Objects.hash(getActor(), getAction(), isSpecial(), revisionId); } @SuppressWarnings("squid:S00107") // private constructor used only in Builder private  JiraVertex(String actor, String action, boolean isSpecial, String filePath, List<Integer> lineNumbers,
                       String location, Date date, String revisionId); Date getDate(); String getRevisionId(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testHashCodeEqualsWithSameClass() { JiraVertex testVertex1 = new JiraVertex.Builder("com.actor", "action").withRevisionId("revisionId").markSpecial().build(); JiraVertex testVertex2 = new JiraVertex.Builder("com.actor", "action").withRevisionId("revisionId").markSpecial().build(); int vertex1HashCode = testVertex1.hashCode(); int vertex2HashCode = testVertex2.hashCode(); assertEquals(testVertex1, testVertex2); assertEquals(vertex1HashCode, vertex2HashCode); assertEquals(vertex1HashCode, testVertex1.hashCode()); assertEquals(vertex2HashCode, testVertex2.hashCode()); }
@Test public void testHashCodeNotEqualsWithParentClass() { Vertex vertex1 = new Vertex.Builder("com.actor", "action").markSpecial().build(); JiraVertex testVertex2 = new JiraVertex.Builder("com.actor", "action").withRevisionId("revisionId").markSpecial().build(); int vertex1HashCode = vertex1.hashCode(); int vertex2HashCode = testVertex2.hashCode(); assertNotEquals(vertex1, testVertex2); assertNotEquals(vertex1HashCode, vertex2HashCode); assertEquals(vertex1HashCode, vertex1.hashCode()); assertEquals(vertex2HashCode, testVertex2.hashCode()); }