DefaultWorldpayOrderInfoStrategy implements WorldpayOrderInfoStrategy { @Override public void populateAdditionalAuthInfo(final AdditionalAuthInfo additionalAuthInfo, final WorldpayMerchantConfigData worldpayMerchantConfigData) { additionalAuthInfo.setOrderContent(worldpayMerchantConfigData.getOrderContent()); additionalAuthInfo.setInstallationId(worldpayMerchantConfigData.getInstallationId()); additionalAuthInfo.setStatementNarrative(worldpayMerchantConfigData.getStatementNarrative()); }  @Override AdditionalAuthInfo getAdditionalAuthInfo(final WorldpayMerchantConfigData worldpayMerchantConfigData); @Override void populateAdditionalAuthInfo(final AdditionalAuthInfo additionalAuthInfo, final WorldpayMerchantConfigData worldpayMerchantConfigData);  }
@Test public void shouldPopulateAdditionalAuthInfo() { when(worldpayMerchantConfigDataMock.getOrderContent()).thenReturn(ORDER_CONTENT); when(worldpayMerchantConfigDataMock.getInstallationId()).thenReturn(INSTALLATION_ID); when(worldpayMerchantConfigDataMock.getStatementNarrative()).thenReturn(STATEMENT_NARRATIVE_TEXT); testObj.populateAdditionalAuthInfo(additionalAuthInfoMock, worldpayMerchantConfigDataMock); verify(additionalAuthInfoMock).setOrderContent(ORDER_CONTENT); verify(additionalAuthInfoMock).setInstallationId(INSTALLATION_ID); verify(additionalAuthInfoMock).setStatementNarrative(STATEMENT_NARRATIVE_TEXT); }