@Test
public void testAnonymousClass() throws Exception {

  @Api() 
  class Test {
    @SuppressWarnings("unused")
    public void test() {
    }
  }
  String apiConfigSource = g.generateConfig(new Test() {}.getClass()).get("myapi-v1.api");
  ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
  assertEquals("test", root.path("methods").path("myapi.test").path("path").asText());
}