Chain implements Iterable<T> { @Override public int hashCode() { return id.hashCode(); } @SafeVarargs  Chain(String id, T... components);  Chain(String id, List<? extends T> components); String id(); boolean isEmpty(); @Override Iterator<T> iterator(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); boolean equals(Chain<?> other);  }
@Test public void hashCode_equals() { assertEquals(new Chain<>("a").hashCode(), new Chain<Filter>("a").hashCode()); }