@Test
public void isAnonymous() throws Exception
{

    final AbstractMetaDataDiscovery mock = new AbstractMetaDataDiscovery()
    {
        @Override
        protected void configure()
        {
            // no-op
        }
    };
    final Method mtd = AbstractMetaDataDiscovery.class.getDeclaredMethod("isAnonymous", String.class);
    mtd.setAccessible(true);
    assertFalse(Boolean.class.cast(mtd.invoke(mock, AbstractMetaDataDiscoveryTest.class.getName())));
    assertTrue(Boolean.class.cast(mtd.invoke(mock, AbstractMetaDataDiscoveryTest.class.getName() + "$1")));
    assertTrue(Boolean.class.cast(mtd.invoke(mock, AbstractMetaDataDiscoveryTest.class.getName() + "$1$2")));
    assertTrue(Boolean.class.cast(mtd.invoke(mock, AbstractMetaDataDiscoveryTest.class.getName() + "$15$222")));
}