@Test
public void testCurrentConfigWithReplacedByClass()
{

    TestMonitor monitor = new TestMonitor();
    ConfigurationMetadata<?> metadata = ConfigurationMetadata.getConfigurationMetadata(CurrentConfigWithReplacedByClass.class, monitor);
    monitor.assertNumberOfErrors(1);
    monitor.assertNumberOfWarnings(0);
    monitor.assertMatchingErrorRecorded("@Config method", "setValue", "claiming to be replaced by", "'other-name'");
}