@Test
public void testComplexTypeArrayRequest() throws Exception {

  @Api class ComplexArray {
    @SuppressWarnings("unused")
    public void foo(@Named("collection") Bean[] beans) {}
  }
  try {
    g.generateConfig(ComplexArray.class).get("myapi-v1.api");
    fail("Non-primitive array should have failed");
  } catch (CollectionResourceException expected) {
    // expected
  }
}