@Test void execute() { final Response error = base .path("action/execute") .queryParam("type", "healthcheck") .queryParam("family", "chain") .queryParam("action", "default") .request(APPLICATION_JSON_TYPE) .post(Entity.entity(new HashMap<String, String>() { { put("dataSet.urls[0]", "empty"); } }, APPLICATION_JSON_TYPE)); assertEquals(200, error.getStatus()); assertEquals(HealthCheckStatus.Status.OK, error.readEntity(HealthCheckStatus.class).getStatus()); }
@Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exceptionally(this::onError)) .orElseGet(() -> doExecuteLocalAction(family, type, action, lang, params)); }
ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exceptionally(this::onError)) .orElseGet(() -> doExecuteLocalAction(family, type, action, lang, params)); } }
ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exceptionally(this::onError)) .orElseGet(() -> doExecuteLocalAction(family, type, action, lang, params)); }  }
ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exceptionally(this::onError)) .orElseGet(() -> doExecuteLocalAction(family, type, action, lang, params)); }  @Override CompletionStage<Response> execute(final String family, final String type, final String action,
            final String lang, final Map<String, String> params); @Override ActionList getIndex(final String[] types, final String[] families, final String language); }
ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exceptionally(this::onError)) .orElseGet(() -> doExecuteLocalAction(family, type, action, lang, params)); }  @Override CompletionStage<Response> execute(final String family, final String type, final String action,
            final String lang, final Map<String, String> params); @Override ActionList getIndex(final String[] types, final String[] families, final String language);  }