WorldpayCancelOrderAction extends AbstractComponentWidgetAdapterAware implements CockpitAction<OrderModel, OrderModel> { @Override public ActionResult<OrderModel> perform(ActionContext<OrderModel> actionContext) { this.sendOutput(SOCKET_OUT_CONTEXT, actionContext.getData()); return new ActionResult<>(SUCCESS); }  @Override boolean canPerform(final ActionContext<OrderModel> actionContext); @Override String getConfirmationMessage(ActionContext<OrderModel> actionContext); @Override boolean needsConfirmation(ActionContext<OrderModel> actionContext); @Override ActionResult<OrderModel> perform(ActionContext<OrderModel> actionContext);  }
@Test public void testPerform() throws Exception { final ActionResult<OrderModel> result = testObj.perform(actionContextMock); verify(testObj).sendOutput(SOCKET_OUT_CONTEXT, orderModelMock); assertEquals(ActionResult.SUCCESS, result.getResultCode()); }