### Question:
DeleteInstruction implements Instruction { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((termsToDelete == null) ? 0 : termsToDelete.hashCode()); return result; } DeleteInstruction(final List<? extends Term> termsToDelete); List<? extends Term> getTermsToDelete(); @Override void apply(final PositionSequence<querqy.model.Term> sequence, final TermMatches termMatches,
                     final int startPosition, final int endPosition, final ExpandedQuery expandedQuery,
                     final SearchEngineRequestAdapter searchEngineRequestAdapter); boolean isToBeDeleted(final querqy.model.Term term); @Override Set<querqy.model.Term> getGenerableTerms(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }### Answer:
@Test public void testHashCode() { DeleteInstruction delete1 = new DeleteInstruction(Arrays.asList(mkTerm("a"), mkTerm("b"))); DeleteInstruction delete2 = new DeleteInstruction(Arrays.asList(mkTerm("a"), mkTerm("b"))); DeleteInstruction delete3 = new DeleteInstruction(Arrays.asList(mkTerm("a"), mkTerm("c"))); DeleteInstruction delete4 = new DeleteInstruction(Arrays.asList(mkTerm("c"), mkTerm("a"))); assertEquals(delete1.hashCode(), delete2.hashCode()); assertNotEquals(delete1.hashCode(), delete3.hashCode()); assertNotEquals(delete2.hashCode(), delete3.hashCode()); assertNotEquals(delete3.hashCode(), delete4.hashCode()); }