@Test public void testIsValid2() { when(configuration.getRestrictPromotions()).thenReturn(true); when(wirecardPaymentConfigurationService.hasNoDiscounts(order)).thenReturn(true); boolean result = paymentConfigurationPromotionFilter.isValid(configuration,order); assertEquals("" + "Is Valid son't work well 2", true, result); }
@Override public boolean isValid(WirecardPaymentConfigurationModel configuration, AbstractOrderModel order) { return restrictionDisabled(configuration) || getWirecardPaymentConfigurationService().hasNoDiscounts(order); }
PaymentConfigurationPromotionFilter implements PaymentConfigurationFilter { @Override public boolean isValid(WirecardPaymentConfigurationModel configuration, AbstractOrderModel order) { return restrictionDisabled(configuration) || getWirecardPaymentConfigurationService().hasNoDiscounts(order); } }
PaymentConfigurationPromotionFilter implements PaymentConfigurationFilter { @Override public boolean isValid(WirecardPaymentConfigurationModel configuration, AbstractOrderModel order) { return restrictionDisabled(configuration) || getWirecardPaymentConfigurationService().hasNoDiscounts(order); }  }
PaymentConfigurationPromotionFilter implements PaymentConfigurationFilter { @Override public boolean isValid(WirecardPaymentConfigurationModel configuration, AbstractOrderModel order) { return restrictionDisabled(configuration) || getWirecardPaymentConfigurationService().hasNoDiscounts(order); }  @Override boolean isValid(WirecardPaymentConfigurationModel configuration, AbstractOrderModel order); @Required void setWirecardPaymentConfigurationService(WirecardPaymentConfigurationService wirecardPaymentConfigurationService); }
PaymentConfigurationPromotionFilter implements PaymentConfigurationFilter { @Override public boolean isValid(WirecardPaymentConfigurationModel configuration, AbstractOrderModel order) { return restrictionDisabled(configuration) || getWirecardPaymentConfigurationService().hasNoDiscounts(order); }  @Override boolean isValid(WirecardPaymentConfigurationModel configuration, AbstractOrderModel order); @Required void setWirecardPaymentConfigurationService(WirecardPaymentConfigurationService wirecardPaymentConfigurationService);  }