DefaultWorldpayOrderService implements WorldpayOrderService { @Override public Shopper createShopper(final String customerEmail, final Session session, final Browser browser) { return new Shopper(customerEmail, null, browser, session); } DefaultWorldpayOrderService(final CommonI18NService commonI18NService, final WorldpayUrlService worldpayUrlService, final SiteConfigService siteConfigService); @Override Amount createAmount(final Currency currency, final int amount); @Override Amount createAmount(final CurrencyModel currencyModel, final double amount); @Override Amount createAmount(final Currency currency, final double amount); @Override BigDecimal convertAmount(final Amount amount); @Override Session createSession(final WorldpayAdditionalInfoData worldpayAdditionalInfo); @Override Browser createBrowser(final WorldpayAdditionalInfoData worldpayAdditionalInfo); @Override BasicOrderInfo createBasicOrderInfo(final String worldpayOrderCode, final String description, final Amount amount); @Override Shopper createShopper(final String customerEmail, final Session session, final Browser browser); @Override Shopper createAuthenticatedShopper(final String customerEmail, final String authenticatedShopperID, final Session session, final Browser browser); @Override TokenRequest createTokenRequest(final String tokenEventReference, final String tokenReason); @Override TokenRequest createTokenRequestForDeletion(final String tokenEventReference, final String tokenReason, final String authenticatedShopperId); @Override CreateTokenServiceRequest createTokenServiceRequest(final MerchantInfo merchantInfo, final String authenticatedShopperId,
                                                               final Payment csePayment, final TokenRequest tokenRequest); @Override Payment createBankPayment(final String paymentMethod, final String shopperBankCode); @Override Payment createKlarnaPayment(final String countryCode, final String languageCode, final String extraMerchantData); @Override Token createToken(final String subscriptionId, final String securityCode); @Override UpdateTokenServiceRequest createUpdateTokenServiceRequest(final MerchantInfo merchantInfo, final WorldpayAdditionalInfoData worldpayAdditionalInfoData,
                                                                     final TokenRequest tokenRequest, final String paymentTokenID,
                                                                     final CardDetails cardDetails); @Override Payment createApplePayPayment(final ApplePayAdditionalAuthInfo worldpayAdditionalInfoApplePayData); @Override Additional3DSData createAdditional3DSData(final WorldpayAdditionalInfoData worldpayAdditionalInfoData); @Override Cse createCsePayment(final CSEAdditionalAuthInfo cseAdditionalAuthInfo, final Address billingAddress); @Override PayWithGoogleSSL createGooglePayPayment(final String protocolVersion, final String signature, final String signedMessage); @Override StoredCredentials createStoredCredentials(final Usage usage, final MerchantInitiatedReason merchantInitiatedReason, final String transactionIdentifier);  }
@Test public void shouldCreateShopperWithoutAuthenticatedShopperID() { final Shopper result = testObj.createShopper(CUSTOMER_EMAIL, sessionMock, browserMock); assertEquals(CUSTOMER_EMAIL, result.getShopperEmailAddress()); assertEquals(sessionMock, result.getSession()); assertEquals(browserMock, result.getBrowser()); assertNull(result.getAuthenticatedShopperID()); }