@SuppressWarnings("unchecked")
    public static <T> AttributeKey<T> newInstance(String name) {
        return (AttributeKey<T>) pool.newInstance(name);
    }
@Test
    public void testNewInstance() {
        String name = "test2";
        assertFalse(AttributeKey.exists(name));
        AttributeKey<String> attr = AttributeKey.newInstance(name);
        assertTrue(AttributeKey.exists(name));
        assertNotNull(attr);

        try {
            AttributeKey.<String>newInstance(name);
            fail();
        } catch (IllegalArgumentException e) {
            // expected
        }
    }