AttributeKey extends AbstractConstant<AttributeKey<T>> { public static boolean exists(String name) { return pool.exists(name); } private  AttributeKey(int id, String name); @SuppressWarnings("unchecked") static AttributeKey<T> valueOf(String name); static boolean exists(String name); @SuppressWarnings("unchecked") static AttributeKey<T> newInstance(String name); @SuppressWarnings("unchecked") static AttributeKey<T> valueOf(Class<?> firstNameComponent, String secondNameComponent);  }
@Test public void testExists() { String name = "test"; assertFalse(AttributeKey.exists(name)); AttributeKey<String> attr = AttributeKey.valueOf(name); assertTrue(AttributeKey.exists(name)); assertNotNull(attr); }