FlagsDisabled { public boolean isFlagDisabled(Object flag) { return flags.contains(flag); }  void add(Object flag); void remove(Object flag); boolean isFlagDisabled(Object flag); @Override String toString(); static FlagsDisabled forQueryOptions(final QueryOptions queryOptions); static boolean isFlagDisabled(QueryOptions queryOptions, Object flag);  }
@Test public void testFlagsDisabled() { QueryOptions queryOptions = queryOptions(disableFlags("a", "b")); assertTrue(isFlagDisabled(queryOptions, "a")); assertTrue(isFlagDisabled(queryOptions, "b")); assertFalse(isFlagDisabled(queryOptions, "c")); }