Keywords { public static KeywordsFactory strictFactory() { return STRICT_KEYWORDS_FACTORY; } private  Keywords(ImmutableSet<Keyword> keywords); static KeywordsFactory strictFactory(); static KeywordsFactory lenientFactory(); Flags asFlags(); Flags asFlagsWithRecentAndDeletedFrom(Flags originFlags); ImmutableMap<String, Boolean> asMap(); ImmutableSet<Keyword> getKeywords(); boolean contains(Keyword keyword); @Override final boolean equals(Object other); @Override final int hashCode(); @Override String toString(); static final Keywords DEFAULT_VALUE; }
@Test public void throwWhenUnsupportedKeywordShouldThrowWhenHaveUnsupportedKeywords() { assertThatThrownBy(() -> Keywords.strictFactory() .fromSet(ImmutableSet.of(Keyword.DRAFT, Keyword.DELETED))) .isInstanceOf(IllegalArgumentException.class); }