WorldpayHopResponseController extends WorldpayChoosePaymentMethodCheckoutStepController { @RequireHardLogIn @RequestMapping(value = "bank-transfer/hop-response", method = RequestMethod.GET) public String doHandleBankTransferHopResponse(final HttpServletRequest request, final Model model, final RedirectAttributes redirectAttributes) { final Map<String, String> requestParameterMap = getRequestParameterMap(request); final RedirectAuthoriseResult redirectAuthoriseResult = redirectAuthoriseResultConverter.convert(requestParameterMap); getWorldpayHostedOrderFacade().completeRedirectAuthorise(redirectAuthoriseResult); return placeOrderAndRedirect(model, redirectAttributes); }  @RequireHardLogIn @RequestMapping(value = "/hop-response", method = RequestMethod.GET) String doHandleHopResponse(final HttpServletRequest request, final Model model, final RedirectAttributes redirectAttributes); @RequireHardLogIn @RequestMapping(value = "/hop-pending", method = RequestMethod.GET) String doHandlePendingHopResponse(final HttpServletRequest request, final Model model, final RedirectAttributes redirectAttributes); @RequireHardLogIn @RequestMapping(value = "bank-transfer/hop-response", method = RequestMethod.GET) String doHandleBankTransferHopResponse(final HttpServletRequest request, final Model model, final RedirectAttributes redirectAttributes); @RequireHardLogIn @RequestMapping(value = "bank-transfer/hop-failure", method = RequestMethod.GET) String doHandleBankTransferHopFailure(final HttpServletRequest request, final RedirectAttributes redirectAttributes); @RequestMapping(value = "/hop-cancel", method = RequestMethod.GET) @RequireHardLogIn String doCancelPayment(); @RequestMapping(value = "/error", method = RequestMethod.GET) @RequireHardLogIn String doHostedOrderPageError(@RequestParam(value = "paymentStatus", required = false) final String paymentStatus, final RedirectAttributes redirectAttributes); @RequestMapping(value = "/billingaddressform", method = RequestMethod.GET) String getCountryAddressForm(@RequestParam("countryIsoCode") final String countryIsoCode,
                                        @RequestParam("useDeliveryAddress") final boolean useDeliveryAddress, final Model model);  }
@Test public void doHandleBankTransferHopResponseShouldCompleteRedirectAndPlaceOrder() throws InvalidCartException { when(redirectAuthoriseResultConverterMock.convert(anyMapOf(String.class, String.class))).thenReturn(redirectAuthoriseResultMock); when(checkoutFacadeMock.placeOrder()).thenReturn(orderDataMock); when(orderDataMock.getCode()).thenReturn(ORDER_CODE); when(checkoutCustomerStrategyMock.isAnonymousCheckout()).thenReturn(false); final String result = testObj.doHandleBankTransferHopResponse(mockHttpServletRequest, modelMock, redirectAttributesMock); verify(worldpayHostedOrderFacadeMock).completeRedirectAuthorise(redirectAuthoriseResultMock); assertEquals(ORDER_CONF_PREFIX + ORDER_CODE, result); }