DefaultWorldpayDirectResponseFacade implements WorldpayDirectResponseFacade { @Override public Boolean isAuthorised(final DirectResponseData directResponseData) { return worldpayDirectResponseService.isAuthorised(directResponseData); } DefaultWorldpayDirectResponseFacade(final WorldpayDirectResponseService worldpayDirectResponseService,
                                               final AcceleratorCheckoutFacade checkoutFacade,
                                               final WorldpayUrlService worldpayUrlService, final WorldpayJsonWebTokenService worldpayJsonWebTokenService, final WorldpayMerchantConfigDataFacade worldpayMerchantConfigDataFacade, final WorldpaySessionService worldpaySessionService); @Override Map<String, String> retrieveAttributesForLegacy3dSecure(final DirectResponseData directResponseData); @Override Map<String, String> retrieveAttributesForFlex3dSecure(final DirectResponseData directResponseData); @Override Boolean isCancelled(final DirectResponseData directResponseData); @Override Boolean isAuthorised(final DirectResponseData directResponseData); @Override Boolean is3DSecureLegacyFlow(final DirectResponseData directResponseData); @Override Boolean is3DSecureFlexFlow(final DirectResponseData directResponseData);  }
@Test public void returnsIfDirectResponseIsAuthorised() { when(worldpayDirectResponseServiceMock.isAuthorised(directResponseDataMock)).thenReturn(true); final Boolean result = testObj.isAuthorised(directResponseDataMock); assertThat(result).isTrue(); }