@Test public void execute() { RegistryContext registryContext = new ContextImpl(); GetDMNMessagesCommand getDMNMessagesCommand = new GetDMNMessagesCommand(); assertThatThrownBy(() -> getDMNMessagesCommand.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<DMNMessage> result = getDMNMessagesCommand.execute(registryContext); assertEquals(0, result.size()); }
@Override public List<DMNMessage> execute(Context context) { return extractDMNResult((RegistryContext) context).getMessages(); }
GetDMNMessagesCommand extends AbstractDMNResultCommand implements ExecutableCommand<List<DMNMessage>> { @Override public List<DMNMessage> execute(Context context) { return extractDMNResult((RegistryContext) context).getMessages(); } }
GetDMNMessagesCommand extends AbstractDMNResultCommand implements ExecutableCommand<List<DMNMessage>> { @Override public List<DMNMessage> execute(Context context) { return extractDMNResult((RegistryContext) context).getMessages(); }  }
GetDMNMessagesCommand extends AbstractDMNResultCommand implements ExecutableCommand<List<DMNMessage>> { @Override public List<DMNMessage> execute(Context context) { return extractDMNResult((RegistryContext) context).getMessages(); }  @Override List<DMNMessage> execute(Context context); }
GetDMNMessagesCommand extends AbstractDMNResultCommand implements ExecutableCommand<List<DMNMessage>> { @Override public List<DMNMessage> execute(Context context) { return extractDMNResult((RegistryContext) context).getMessages(); }  @Override List<DMNMessage> execute(Context context);  }