WorldpaySummaryCheckoutStepController extends AbstractWorldpayDirectCheckoutStepController { @GetMapping(value = "/DDCIframe") @RequireHardLogIn public String getDDCIframeContent(final Model model) { setDDCIframeData(model); return worldpayAddonEndpointService.getDdcIframe3dSecureFlex(); }  @RequestMapping(value = "/view", method = RequestMethod.GET) @RequireHardLogIn @PreValidateCheckoutStep(checkoutStep = SUMMARY) String enterStep(final Model model, final RedirectAttributes redirectAttributes, final HttpServletResponse response); @RequestMapping(value = "/placeOrder") @RequireHardLogIn String placeOrder(@ModelAttribute("csePaymentForm") final CSEPaymentForm csePaymentForm, final Model model,
                             final HttpServletRequest request, final RedirectAttributes redirectAttributes, final HttpServletResponse response); @RequestMapping(value = "/express", method = RequestMethod.GET) @RequireHardLogIn String performExpressCheckout(final Model model, final RedirectAttributes redirectModel, final HttpServletResponse response); @GetMapping(value = "/DDCIframe") @RequireHardLogIn String getDDCIframeContent(final Model model); @GetMapping(value = "/challengeIframe") @RequireHardLogIn String getChallengeIframeContent(final Model model); @RequestMapping(value = "/back", method = RequestMethod.GET) @RequireHardLogIn @Override String back(final RedirectAttributes redirectAttributes); @RequestMapping(value = "/next", method = RequestMethod.GET) @RequireHardLogIn @Override String next(final RedirectAttributes redirectAttributes); @Override CheckoutFlowFacade getCheckoutFlowFacade();  }
@Test public void shouldPopulate3DSecureJsonWebToken() { when(worldpayDDCFacadeMock.createJsonWebTokenForDDC()).thenReturn(THREEDSFLEX_JSON_WEB_TOKEN_VALUE); when(worldpayDDCFacadeMock.getEventOriginDomainForDDC()).thenReturn(THREEDSFLEX_EVENT_ORIGIN_DOMAIN_VALUE); when(worldpayAddonEndpointServiceMock.getDdcIframe3dSecureFlex()).thenReturn(THREDSFLEX_DDC_PAGE); final String result = testObj.getDDCIframeContent(modelMock); assertThat(result).isEqualTo(THREDSFLEX_DDC_PAGE); }