  @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());
  }