### Question:
PaymentMethodsPopulator extends AbstractOrderAwarePaymentPopulator { public void setPaymentMethodName(String paymentMethodName) { this.paymentMethodName = paymentMethodName; }  @Override void doPopulate(AbstractOrderModel source, Payment target); @Required void setWirecardObjectFactory(ObjectFactory wirecardObjectFactory); PaymentMethodName getPaymentMethodName(AbstractOrderModel source); void setPaymentMethodName(String paymentMethodName);  }### Answer:
@Test public void populateTest() { Payment target = new Payment(); paymentMethodsPopulator.populate(source, target); assertNotNull("Payment methods are null", target.getPaymentMethods()); assertFalse("Payment method list is empty", target.getPaymentMethods().getPaymentMethod().isEmpty()); paymentMethodsPopulator.setPaymentMethodName("CREDITCARD"); paymentMethodsPopulator.populate(source, target); assertFalse("Payment method list is empty", target.getPaymentMethods().getPaymentMethod().isEmpty()); }