@Test
public void testSerializedEnum() throws Exception {

  class OutcomeToIntegerSerializer extends DefaultValueSerializer<Outcome, Integer> {
  }
  @Api(transformers = {OutcomeToIntegerSerializer.class})
  class EnumParameter {
    @SuppressWarnings("unused")
    public void foo(@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.foo").path("request");
  verifyMethodRequestParameter(request, "outcome", "int32", true, false);
}