### Question:
ShortComparisonStep implements ComparisonStep<T> { @Override public boolean isEqual(T object1, T object2) { return valueExtractor.applyAsShort(object1) == valueExtractor.applyAsShort(object2); } ShortComparisonStep(ToShortFunction<? super T> valueExtractor); @Override boolean isEqual(T object1, T object2);  }### Answer:
@Test void givenValuesAreEqualItShouldReturnTrue() { ShortComparisonStep<TestData> hashStep = new ShortComparisonStep<>(TestData::getValue); boolean result = hashStep.isEqual(new TestData((short) 1234), new TestData((short) 1234)); assertThat(result) .isTrue(); }
@Test void givenValuesAreNotEqualItShouldReturnFalse() { ShortComparisonStep<TestData> hashStep = new ShortComparisonStep<>(TestData::getValue); boolean result = hashStep.isEqual(new TestData((short) 1234), new TestData((short) 1337)); assertThat(result) .isFalse(); }