@Test
public void testArraysOfCollections() throws Exception {

  class Foo {
    @SuppressWarnings("unused")
    public void foo(List<String>[] l) {}
  }
  config.getApiClassConfig().getMethods()
      .get(methodToEndpointMethod(TestEndpoint.class.getMethod("getResultNoParams")))
      .addParameter("param", null, false, null,
          TypeToken.of(
              Foo.class.getDeclaredMethod("foo", List[].class).getGenericParameterTypes()[0]));
  try {
    validator.validate(config);
    fail("Expected NestedCollectionException.");
  } catch (NestedCollectionException expected) {
  }
}