@Test
public void testInconsistentApiWideConfig() throws Exception {

  @Api(scopes = { "foo" })
  @ApiClass(scopes = { "scopes" })
  final class Test1 {}
  @Api(scopes = { "bar" })
  @ApiClass(scopes = { "scopes" })
  final class Test2 {}
  try {
    g.generateConfig(Test1.class, Test2.class);
    fail();
  } catch (InconsistentApiConfigurationException e) {
    // Expected exception.
  }
}