AbstractWorldpayPaymentMethodCheckoutStepController extends AbstractCheckoutStepController { @ModelAttribute("cardTypes") public Collection<CardTypeData> getCardTypes() { return getCheckoutFacade().getSupportedCardTypes(); }  @ModelAttribute("billingCountries") Collection<CountryData> getBillingCountries(); @ModelAttribute("cardTypes") Collection<CardTypeData> getCardTypes(); @ModelAttribute("months") List<SelectOption> getMonths(); @ModelAttribute("expiryYears") List<SelectOption> getExpiryYears(); WorldpayPaymentCheckoutFacade getWorldpayPaymentCheckoutFacade(); WorldpayHostedOrderFacade getWorldpayHostedOrderFacade(); WorldpayAdditionalInfoFacade getWorldpayAdditionalInfoFacade(); WorldpayMerchantConfigDataFacade getWorldpayMerchantConfigDataFacade();  }
@Test public void shouldPopulateModelWithSupportedCardTypes() { when(checkoutFacadeMock.getSupportedCardTypes()).thenReturn(supportedCardTypes); final Collection<CardTypeData> result = testObj.getCardTypes(); assertEquals(supportedCardTypes, result); }