TokenizerMaps { static Function<String, Fragment> fragment(final Object tag) { return new Function<String, Fragment>() { @Override public Fragment apply(String text) { return Tokens.fragment(text, tag); } @Override public String toString() { return String.valueOf(tag); } }; }    }
@Test public void testFragment() { assertFragment("foo", TokenizerMaps.fragment("foo")); }