@Test
public void testGenericCollectionRequest() throws Exception {

  @Api
  abstract class GenericCollection<T> {
    @SuppressWarnings("unused")
    public void foo(@Named("collection") Collection<T> t) {}
  }
  // TODO: remove with JDK8, dummy to force inclusion of GenericArray to InnerClass attribute
  // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2210448
  GenericCollection<Long> dummy = new GenericCollection<Long>() {};
  class Int64Collection extends GenericCollection<Long> {}
  String apiConfigSource = g.generateConfig(Int64Collection.class).get("myapi-v1.api");
  ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
  JsonNode methodNode = root.path("methods").path("myapi.int64Collection.foo");
  assertFalse(methodNode.isMissingNode());
  verifyMethodRequestParameter(methodNode.get("request"), "collection", "int64", true, true);
}