@Test public void shouldNotBeEqualIfSuppliedIterablesAreDifferent() throws Exception { Generator<Integer> firstGenerator = new CyclicGenerator<Integer>(iterableWith(1, 2, 3)); Generator<Integer> secondGenerator = new CyclicGenerator<Integer>(iterableWith(4, 5, 6)); boolean equal = firstGenerator.equals(secondGenerator); assertThat(equal, is(false)); }
@Override public boolean equals(Object other) { return EqualsBuilder.reflectionEquals(this, other, excludedFields); }
CyclicGenerator extends AbstractGenerator<T> { @Override public boolean equals(Object other) { return EqualsBuilder.reflectionEquals(this, other, excludedFields); } }
CyclicGenerator extends AbstractGenerator<T> { @Override public boolean equals(Object other) { return EqualsBuilder.reflectionEquals(this, other, excludedFields); } CyclicGenerator(Iterable<T> iterable); }
CyclicGenerator extends AbstractGenerator<T> { @Override public boolean equals(Object other) { return EqualsBuilder.reflectionEquals(this, other, excludedFields); } CyclicGenerator(Iterable<T> iterable); @Override T next(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
CyclicGenerator extends AbstractGenerator<T> { @Override public boolean equals(Object other) { return EqualsBuilder.reflectionEquals(this, other, excludedFields); } CyclicGenerator(Iterable<T> iterable); @Override T next(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }