@Test
public void testComplexTypeCollectionRequest() throws Exception {

  @Api class ComplexCollection {
    @SuppressWarnings("unused")
    public void foo(@Named("collection") Collection<Object> dates){}
  }
  try {
    g.generateConfig(ComplexCollection.class).get("myapi-v1.api");
    fail("Non-primitive array should have failed");
  } catch (CollectionResourceException expected) {
    // expected
  }
}