ItemNamePattern implements RestrictionPattern { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof ItemNamePattern) { ItemNamePattern other = (ItemNamePattern) obj; return names.equals(other.names); } return false; } ItemNamePattern(Iterable<String> names); @Override boolean matches(@NotNull Tree tree, @Nullable PropertyState property); @Override boolean matches(@NotNull String path); @Override boolean matches(); @Override int hashCode(); @Override String toString(); @Override boolean equals(Object obj);  }
@Test public void testEquals() { assertEquals(pattern, pattern); assertEquals(pattern, new ItemNamePattern(names)); }