@Test public void behaviorHighFrequencyEventsServiceSimpleScenarioTest() { addPaymentTransactionsAndChargeBacks(); double bucketSumScore = bucketChargeBackEventsService.getBucketSumScore(bucketChargeBackEventsData); Assert.assertTrue(bucketSumScore < 0); }
@Override public double getBucketSumScore(BucketChargeBackEventsData bucketChargeBackEventsData) { BucketChargeBackEventsCalculator bucketCalculator = new BucketChargeBackEventsCalculator(bucketChargeBackEventsData); if (bucketCalculator.decayScores(bucketChargeBackEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketChargeBackEventsData); }
BucketChargeBackEventsService implements IBucketEventService<ChargeBackEventsData, BucketChargeBackEventsData> { @Override public double getBucketSumScore(BucketChargeBackEventsData bucketChargeBackEventsData) { BucketChargeBackEventsCalculator bucketCalculator = new BucketChargeBackEventsCalculator(bucketChargeBackEventsData); if (bucketCalculator.decayScores(bucketChargeBackEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketChargeBackEventsData); } }
BucketChargeBackEventsService implements IBucketEventService<ChargeBackEventsData, BucketChargeBackEventsData> { @Override public double getBucketSumScore(BucketChargeBackEventsData bucketChargeBackEventsData) { BucketChargeBackEventsCalculator bucketCalculator = new BucketChargeBackEventsCalculator(bucketChargeBackEventsData); if (bucketCalculator.decayScores(bucketChargeBackEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketChargeBackEventsData); }  }
BucketChargeBackEventsService implements IBucketEventService<ChargeBackEventsData, BucketChargeBackEventsData> { @Override public double getBucketSumScore(BucketChargeBackEventsData bucketChargeBackEventsData) { BucketChargeBackEventsCalculator bucketCalculator = new BucketChargeBackEventsCalculator(bucketChargeBackEventsData); if (bucketCalculator.decayScores(bucketChargeBackEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketChargeBackEventsData); }  @Override BucketChargeBackEventsData addEventToCalculations(ChargeBackEventsData chargeBackEventsData,
                                                             BucketChargeBackEventsData bucketChargeBackEventsData); void addPaymentTransactionToCalculations(TransactionData transactionData, BucketChargeBackEventsData bucketChargeBackEventsData); @Override double getBucketSumScore(BucketChargeBackEventsData bucketChargeBackEventsData); @Override EventType getBucketEventType(); void init(RulesData rulesData); }
BucketChargeBackEventsService implements IBucketEventService<ChargeBackEventsData, BucketChargeBackEventsData> { @Override public double getBucketSumScore(BucketChargeBackEventsData bucketChargeBackEventsData) { BucketChargeBackEventsCalculator bucketCalculator = new BucketChargeBackEventsCalculator(bucketChargeBackEventsData); if (bucketCalculator.decayScores(bucketChargeBackEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketChargeBackEventsData); }  @Override BucketChargeBackEventsData addEventToCalculations(ChargeBackEventsData chargeBackEventsData,
                                                             BucketChargeBackEventsData bucketChargeBackEventsData); void addPaymentTransactionToCalculations(TransactionData transactionData, BucketChargeBackEventsData bucketChargeBackEventsData); @Override double getBucketSumScore(BucketChargeBackEventsData bucketChargeBackEventsData); @Override EventType getBucketEventType(); void init(RulesData rulesData);  }