@Test
public void testInconsistentApiWideConfig() throws Exception {

  @Api(name = "testApi", version = "v1", resource = "foo")
  final class Test1 {}
  ApiConfig config1 = configLoader.loadConfiguration(ServiceContext.create(), Test1.class);
  @Api(name = "testApi", version = "v1", resource = "bar")
  final class Test2 {}
  ApiConfig config2 = configLoader.loadConfiguration(ServiceContext.create(), Test2.class);
  try {
    validator.validate(Lists.newArrayList(config1, config2));
    fail("Expected InconsistentApiConfigurationException.");
  } catch (InconsistentApiConfigurationException expected) {
  }
}