CancelWholeOrderDueToCancelNotificationAction extends AbstractProceduralAction<OrderProcessModel> { @Override public void executeAction(final OrderProcessModel orderProcessModel) { worldpayCancelWholeOrderDueToCancelNotificationStrategy.cancelOrder(orderProcessModel); } CancelWholeOrderDueToCancelNotificationAction(final WorldpayCancelWholeOrderDueToCancelNotificationStrategy worldpayCancelWholeOrderDueToCancelNotificationStrategy); @Override void executeAction(final OrderProcessModel orderProcessModel);  }
@Test public void shouldCancelTheOrder() { testObj.executeAction(orderProcessModelMock); verify(worldpayCancelWholeOrderDueToCancelNotificationStrategyMock).cancelOrder(orderProcessModelMock); }