@Test
public void testResourceAndCollection() throws Exception {

  @Api
  class ResourceAndCollection {
    @SuppressWarnings("unused")
    public void foo(Bean resource, @Named("authors") List<String> authors) {}
  }
  String apiConfigSource = g.generateConfig(ResourceAndCollection.class).get("myapi-v1.api");
  ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
  JsonNode methodNode = root.path("methods").path("myapi.resourceAndCollection.foo");
  assertFalse(methodNode.isMissingNode());
  verifyMethodRequestParameter(methodNode.get("request"), "authors", "string", true, true);
  assertEquals(1, methodNode.path("request").path("parameters").size());
  verifyMethodRequestRef(root, ResourceAndCollection.class.getName() + ".foo", "Bean");
}