WorkflowExecutorResource extends JaxRsResource { @GET @ApiOperation(value = "List workflow executors", response = ListWorkflowExecutorResponse.class, responseContainer = "List") public Response listWorkflowExecutors() { return handleExceptions( () -> ok(workflowExecutors.getWorkflowExecutors().stream().map(converter::convert).collect(toList()))); } @Inject  WorkflowExecutorResource(WorkflowExecutorService workflowExecutors, ListWorkflowExecutorConverter converter); @GET @ApiOperation(value = "List workflow executors", response = ListWorkflowExecutorResponse.class, responseContainer = "List") Response listWorkflowExecutors();  }
@Test public void listWorkflowExecutorsReturnsExistingExecutors() { assertThat(resource.listWorkflowExecutors().readEntity(List.class).size(), is(1)); }