@Test public void testGraphsWithDifferentOptionalityNotEqual() { final EntityGraph optionalGraph = new NamedEntityGraph(EntityGraphType.LOAD, true, "graph"); final EntityGraph requiredGraph = new NamedEntityGraph(EntityGraphType.LOAD, false, "graph"); assertNotEquals(optionalGraph, requiredGraph); assertNotEquals(optionalGraph.hashCode(), requiredGraph.hashCode()); }
@Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } NamedEntityGraph(EntityGraphType type, boolean optional, String name);  NamedEntityGraph(EntityGraphType type, String name);  NamedEntityGraph(String name); }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } NamedEntityGraph(EntityGraphType type, boolean optional, String name);  NamedEntityGraph(EntityGraphType type, String name);  NamedEntityGraph(String name); @Override String getEntityGraphName(); @Override final List<String> getEntityGraphAttributePaths(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } NamedEntityGraph(EntityGraphType type, boolean optional, String name);  NamedEntityGraph(EntityGraphType type, String name);  NamedEntityGraph(String name); @Override String getEntityGraphName(); @Override final List<String> getEntityGraphAttributePaths(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }