GetDMNDecisionResultsCommand extends AbstractDMNResultCommand implements ExecutableCommand<List<DMNDecisionResult>> { @Override public List<DMNDecisionResult> execute(Context context) { return extractDMNResult((RegistryContext) context).getDecisionResults(); }  @Override List<DMNDecisionResult> execute(Context context);  }
@Test public void execute() { RegistryContext registryContext = new ContextImpl(); GetDMNDecisionResultsCommand getDMNDecisionResultsCommand = new GetDMNDecisionResultsCommand(); assertThatThrownBy(() -> getDMNDecisionResultsCommand.execute(registryContext)) .isInstanceOf(IllegalStateException.class) .hasMessage("There is no DMNResult available"); DMNResultImpl dmnResult = new DMNResultImpl(null); dmnResult.setContext(new DMNContextImpl()); registryContext.register(DMNResult.class, dmnResult); List<DMNDecisionResult> result = getDMNDecisionResultsCommand.execute(registryContext); assertEquals(0, result.size()); }