@Test
public void testOptionalParameters() throws Exception {

  String apiConfigSource = g.generateConfig(TestEndpoint.class).get("myapi-v1.api");
  ObjectNode root = objectMapper.readValue(apiConfigSource, ObjectNode.class);
  assertEquals("foo/{required}",
      root.path("methods").path("myapi.testEndpoint.getItem").path("path").asText());
}