@Test public void testInformation() { String content = route.run(HttpRequest.GET("/information")) .assertStatusCode(StatusCodes.OK) .assertContentType(ContentTypes.APPLICATION_JSON) .entityString(); assertTrue(content.contains("engine")); }
private Route information() { return complete( StatusCodes.OK, new Information(ENGINE_NAME, ENGINE_VERSION, ManagementFactory.getRuntimeMXBean().getUptime()), Jackson.marshaller() ); }
RestService { private Route information() { return complete( StatusCodes.OK, new Information(ENGINE_NAME, ENGINE_VERSION, ManagementFactory.getRuntimeMXBean().getUptime()), Jackson.marshaller() ); } }
RestService { private Route information() { return complete( StatusCodes.OK, new Information(ENGINE_NAME, ENGINE_VERSION, ManagementFactory.getRuntimeMXBean().getUptime()), Jackson.marshaller() ); } RestService(ActorSystem system, ActorRef authenticator, ActorRef balancer,
                       EntityManager entityManager); }
RestService { private Route information() { return complete( StatusCodes.OK, new Information(ENGINE_NAME, ENGINE_VERSION, ManagementFactory.getRuntimeMXBean().getUptime()), Jackson.marshaller() ); } RestService(ActorSystem system, ActorRef authenticator, ActorRef balancer,
                       EntityManager entityManager); Route createRoute(); }
RestService { private Route information() { return complete( StatusCodes.OK, new Information(ENGINE_NAME, ENGINE_VERSION, ManagementFactory.getRuntimeMXBean().getUptime()), Jackson.marshaller() ); } RestService(ActorSystem system, ActorRef authenticator, ActorRef balancer,
                       EntityManager entityManager); Route createRoute(); static final String ENGINE_NAME; static final String ENGINE_VERSION; }