### Question:
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);  }### Answer:
@Test public void bucketBehaviorEventsServiceSimpleScenarioTest() { addBehaviorEvents(); for (int i = 0; i < 8; i++) { addFillingTheQuestionnaireEvent(UserType.MERCHANT); } for (int i = 0; i < 6; i++) { addFillingTheQuestionnaireEvent(UserType.MERCHANT); } double bucketSumScore = bucketBehaviorEventsService.getBucketSumScore(bucketBehaviorEventsData); Assert.assertTrue(bucketSumScore < 0); }
@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); }