@Test public void bucketBehaviorEventsServiceWithLargeDecayTest() { addBehaviorEvents(); performSimulationOfDecay(400); addBehaviorEvents(); performSimulationOfDecay(1); bucketBehaviorEventsService.getBucketSumScore(bucketBehaviorEventsData); addBehaviorEvents(); bucketBehaviorEventsService.getBucketSumScore(bucketBehaviorEventsData); performSimulationOfDecay(20); performSimulationOfDecay(350); double bucketSumScore = bucketBehaviorEventsService.getBucketSumScore(bucketBehaviorEventsData); Assert.assertTrue(bucketSumScore < 0); }
@Override public double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData) { BucketBehaviorEventsCalculator bucketCalculator = new BucketBehaviorEventsCalculator(bucketBehaviorEventsData); if (bucketCalculator.decayScores(bucketBehaviorEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketBehaviorEventsData); }
BucketBehaviorEventsService implements IBucketEventService<BehaviorEventsData, BucketBehaviorEventsData> { @Override public double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData) { BucketBehaviorEventsCalculator bucketCalculator = new BucketBehaviorEventsCalculator(bucketBehaviorEventsData); if (bucketCalculator.decayScores(bucketBehaviorEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketBehaviorEventsData); } }
BucketBehaviorEventsService implements IBucketEventService<BehaviorEventsData, BucketBehaviorEventsData> { @Override public double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData) { BucketBehaviorEventsCalculator bucketCalculator = new BucketBehaviorEventsCalculator(bucketBehaviorEventsData); if (bucketCalculator.decayScores(bucketBehaviorEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketBehaviorEventsData); }  }
BucketBehaviorEventsService implements IBucketEventService<BehaviorEventsData, BucketBehaviorEventsData> { @Override public double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData) { BucketBehaviorEventsCalculator bucketCalculator = new BucketBehaviorEventsCalculator(bucketBehaviorEventsData); if (bucketCalculator.decayScores(bucketBehaviorEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketBehaviorEventsData); }  @Override BucketBehaviorEventsData addEventToCalculations(BehaviorEventsData behaviorEventsData, BucketBehaviorEventsData bucketBehaviorEventsData); @Override EventType getBucketEventType(); @Override double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData); void init(RulesData rulesData); }
BucketBehaviorEventsService implements IBucketEventService<BehaviorEventsData, BucketBehaviorEventsData> { @Override public double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData) { BucketBehaviorEventsCalculator bucketCalculator = new BucketBehaviorEventsCalculator(bucketBehaviorEventsData); if (bucketCalculator.decayScores(bucketBehaviorEventsData)) { bucketCalculator.setCurrentScores(); } return bucketCalculator.getBucketSumScore(bucketBehaviorEventsData); }  @Override BucketBehaviorEventsData addEventToCalculations(BehaviorEventsData behaviorEventsData, BucketBehaviorEventsData bucketBehaviorEventsData); @Override EventType getBucketEventType(); @Override double getBucketSumScore(BucketBehaviorEventsData bucketBehaviorEventsData); void init(RulesData rulesData);  }