@Test
public void testEnumCollection() throws Exception {

  @Api
  class EnumParameters {
    @SuppressWarnings("unused")
    public void foo(@Named("outcome") Outcome outcome,
        @Named("outcomes1") Collection<Outcome> outcomes1,
        @Named("outcomes2") Outcome[] outcomes2) { }
  }
  String apiConfigSource = g.generateConfig(EnumParameters.class).get("myapi-v1.api");
  ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
  JsonNode request = root.path("methods").path("myapi.enumParameters.foo").path("request");
  verifyMethodRequestParameter(request, "outcome", "string", true, false, "WON", "LOST", "TIE");
  verifyMethodRequestParameter(request, "outcomes1", "string", true, true, "WON", "LOST", "TIE");
  verifyMethodRequestParameter(request, "outcomes2", "string", true, true, "WON", "LOST", "TIE");
  assertTrue(root.path("descriptor").path("schemas").path("Outcome").isMissingNode());
  verifyEmptyMethodRequest(root, EnumParameters.class.getName() + ".foo");
}