SwaggerBuilder { public String generateJSON(Collection<Route> routes) { Swagger swagger = build(routes); String json = Json.pretty(swagger); return json; } SwaggerBuilder(Settings settings, Router router);  SwaggerBuilder(Settings settings, Router router, ContentTypeEngines engines, Messages messages); String generateJSON(Collection<Route> routes); Swagger build(Collection<Route> routes);  }
@Test public void testGenerate() throws Exception { DefaultRouter router = new DefaultRouter(); for (Route route : getRoutes()) { router.addRoute(route); } SwaggerBuilder sb = new SwaggerBuilder(settings, router); String json = sb.generateJSON(router.getRoutes()); assertNotNull(json); }