@Test
public void testValidEnumInParameter() throws Exception {

  @Api
  class EnumParameter {
    @SuppressWarnings("unused")
    public void pick(@Named("outcome") Outcome outcome) { }
  }
  String apiConfigSource = g.generateConfig(EnumParameter.class).get("myapi-v1.api");
  ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
  JsonNode request = root.path("methods").path("myapi.enumParameter.pick").path("request");
  verifyMethodRequestParameter(request, "outcome", "string", true, false, "WON", "LOST", "TIE");
  assertTrue(root.path("descriptor").path("schemas").path("Outcome").isMissingNode());
  verifyEmptyMethodRequest(root, EnumParameter.class.getName() + ".pick");
}