### Question:
DecorateInstruction implements Instruction { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DecorateInstruction that = (DecorateInstruction) o; return Objects.equals(decorationKey, that.decorationKey) && Objects.equals(decorationValue, that.decorationValue); } DecorateInstruction(final Object decorationValue);  DecorateInstruction(final String decorationKey, final Object decorationValue); @Override void apply(final PositionSequence<Term> sequence, final TermMatches termMatches,
            final int startPosition, final int endPosition, final ExpandedQuery expandedQuery,
                      final SearchEngineRequestAdapter searchEngineRequestAdapter); @Override Set<Term> getGenerableTerms(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String DECORATION_CONTEXT_KEY; static final String DECORATION_CONTEXT_MAP_KEY; }### Answer:
@Test public void testEquals() { DecorateInstruction deco1 = new DecorateInstruction("decoA"); DecorateInstruction deco2 = new DecorateInstruction("decoA"); DecorateInstruction deco3 = new DecorateInstruction("deco3"); Assert.assertEquals(deco1, deco2); Assert.assertEquals(deco1.hashCode(), deco2.hashCode()); Assert.assertEquals(deco1, deco1); Assert.assertNotEquals(deco1, deco3); Assert.assertNotEquals(deco2, deco3); Assert.assertNotEquals(deco2, null); Assert.assertNotEquals(deco2, new Object()); }