@Test
public void testLegacyConfigDuplicatesConfigOnLinkedMethodClass()
        throws Exception
{

    TestMonitor monitor = new TestMonitor();
    ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(LegacyConfigDuplicatesConfigOnLinkedMethodClass.class, monitor);
    Map<String, Set<String>> expectedAttributes = new HashMap<>();
    expectedAttributes.put("Value", ImmutableSet.of("value"));
    verifyMetaData(metadata, LegacyConfigDuplicatesConfigOnLinkedMethodClass.class, null, false, expectedAttributes);
    monitor.assertNumberOfErrors(2);
    monitor.assertNumberOfWarnings(0);
    monitor.assertMatchingErrorRecorded("@LegacyConfig", "'value'", "is replaced by @Config", "same name", "setValue");
    monitor.assertMatchingErrorRecorded("@LegacyConfig", "setIntValue", "not associated with any valid @Config");
}