@Test public void testAddBucketCounts() { Bucket.Label label = Bucket.Label.valueOf("TestLabel"); BucketCounts bucketCounter = new BucketCounts.Builder().withLabel(label) .withJointActionCounts(jointActionCounts).withImpressionCounts(impressionCounts) .withActionCounts(actionCounts).build(); counter.addBucketCounts(label, bucketCounter); assertThat(counter.getBuckets(), hasKey(label)); ExperimentCounts clonedExperimentCounter = counter.clone(); assertThat(clonedExperimentCounter.getBuckets(), hasKey(label)); counter.setBuckets(buckets); }
@JsonIgnore public void addBucketCounts(Bucket.Label bucketLabel, BucketCounts bucketCounts) { if (this.buckets == null) { this.buckets = new HashMap<>(); } this.buckets.put(bucketLabel, bucketCounts); }
ExperimentCounts extends AbstractContainerCounts { @JsonIgnore public void addBucketCounts(Bucket.Label bucketLabel, BucketCounts bucketCounts) { if (this.buckets == null) { this.buckets = new HashMap<>(); } this.buckets.put(bucketLabel, bucketCounts); } }
ExperimentCounts extends AbstractContainerCounts { @JsonIgnore public void addBucketCounts(Bucket.Label bucketLabel, BucketCounts bucketCounts) { if (this.buckets == null) { this.buckets = new HashMap<>(); } this.buckets.put(bucketLabel, bucketCounts); }  }
ExperimentCounts extends AbstractContainerCounts { @JsonIgnore public void addBucketCounts(Bucket.Label bucketLabel, BucketCounts bucketCounts) { if (this.buckets == null) { this.buckets = new HashMap<>(); } this.buckets.put(bucketLabel, bucketCounts); }  @JsonIgnore void addBucketCounts(Bucket.Label bucketLabel, BucketCounts bucketCounts); Map<Bucket.Label, BucketCounts> getBuckets(); void setBuckets(Map<Bucket.Label, BucketCounts> value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ExperimentCounts clone(); }
ExperimentCounts extends AbstractContainerCounts { @JsonIgnore public void addBucketCounts(Bucket.Label bucketLabel, BucketCounts bucketCounts) { if (this.buckets == null) { this.buckets = new HashMap<>(); } this.buckets.put(bucketLabel, bucketCounts); }  @JsonIgnore void addBucketCounts(Bucket.Label bucketLabel, BucketCounts bucketCounts); Map<Bucket.Label, BucketCounts> getBuckets(); void setBuckets(Map<Bucket.Label, BucketCounts> value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ExperimentCounts clone();  }