@Test
public void testGenericArrayRequest() throws Exception {

  @Api abstract class GenericArray<T> {
    @SuppressWarnings("unused")
    public void foo(@Named("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
  GenericArray<Integer> dummy = new GenericArray<Integer>() {};
  class Int32Array extends GenericArray<Integer> {}
  String apiConfigSource = g.generateConfig(Int32Array.class).get("myapi-v1.api");
  ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
  JsonNode methodNode = root.path("methods").path("myapi.int32Array.foo");
  assertFalse(methodNode.isMissingNode());
  verifyMethodRequestParameter(methodNode.get("request"), "collection", "int32", true, true);
}