@Test
public void testApiWideConfigWithInvalidApiName() throws Exception {

  @Api(name = "TestApi", version = "v1", resource = "bar")
  final class Test {}
  ApiConfig config = configLoader.loadConfiguration(ServiceContext.create(), Test.class);
  try {
    validator.validate(config);
    fail("Expected InvalidApiNameException.");
  } catch (InvalidApiNameException expected) {
  }
}