Tokens { public static Fragment fragment(String text, Object tag) { return new Fragment(text, tag); } private  Tokens(); static Fragment fragment(String text, Object tag); static Fragment reserved(String name); static Fragment identifier(String name); static Fragment decimalLiteral(String s); static Fragment integerLiteral(String s); static ScientificNotation scientificNotation(String significand, String exponent);  }
@Test public void testFragment() { Tokens.Fragment fragment = Tokens.fragment("foo", 1); assertEquals("foo", fragment.toString()); assertFragment(1, "foo", fragment); ObjectTester.assertEqual(fragment, fragment, Tokens.fragment("foo", 1)); ObjectTester.assertNotEqual(fragment, Tokens.fragment("foo", 2), Tokens.fragment("foo", "1"), Tokens.fragment("bar", 1), "foo", 1); }