### Question:
OverwrittenForLoopIteratorViolation implements Violation { @Override public int hashCode() { return new HashCodeBuilder().append(iterator.toLowerCase(Locale.US)).append(lineNumber).toHashCode(); } OverwrittenForLoopIteratorViolation(final String iterator, final Integer lineNumber); @Override boolean equals(final Object obj); String getIterator(); @Override Integer getLineNumber(); @Override String getViolationDescription(); @Override String getViolationExplanation(); @Override ViolationId getViolationId(); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEqualsCaseInsensitiveIterator() { final OverwrittenForLoopIteratorViolation first = createViolation(null); final OverwrittenForLoopIteratorViolation second = new OverwrittenForLoopIteratorViolation( StringUtils.swapCase(iterator), null); assertThat(first).isEqualTo(second); assertThat(second).isEqualTo(first); assertThat(first.hashCode()).isEqualTo(second.hashCode()); }