@Test public void testClone() { when(progress.clone()).thenReturn(progress); when(impressionCounts.clone()).thenReturn(impressionCounts); when(actionCounts.clone()).thenReturn(actionCounts); when(estimate.clone()).thenReturn(estimate); when(jointProgress.clone()).thenReturn(jointProgress); ExperimentStatistics clonedExperimentStatistics = experimentStatistics.clone(); assertThat(clonedExperimentStatistics.equals(experimentStatistics), is(true)); }
@Override public ExperimentStatistics clone() { ExperimentStatistics cloned = (ExperimentStatistics) super.clone(); if (jointProgress != null) { cloned.setJointProgress(jointProgress.clone()); } if (experimentProgress != null) { cloned.setExperimentProgress(experimentProgress.clone()); } if (buckets != null) { Map<Bucket.Label, BucketStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } if (actionProgress != null) { Map<Event.Name, ActionProgress> clonedActions = new HashMap<>(); for (Entry<Name, ActionProgress> entry : actionProgress.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionProgress(clonedActions); } return cloned; }
ExperimentStatistics extends AbstractContainerStatistics { @Override public ExperimentStatistics clone() { ExperimentStatistics cloned = (ExperimentStatistics) super.clone(); if (jointProgress != null) { cloned.setJointProgress(jointProgress.clone()); } if (experimentProgress != null) { cloned.setExperimentProgress(experimentProgress.clone()); } if (buckets != null) { Map<Bucket.Label, BucketStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } if (actionProgress != null) { Map<Event.Name, ActionProgress> clonedActions = new HashMap<>(); for (Entry<Name, ActionProgress> entry : actionProgress.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionProgress(clonedActions); } return cloned; } }
ExperimentStatistics extends AbstractContainerStatistics { @Override public ExperimentStatistics clone() { ExperimentStatistics cloned = (ExperimentStatistics) super.clone(); if (jointProgress != null) { cloned.setJointProgress(jointProgress.clone()); } if (experimentProgress != null) { cloned.setExperimentProgress(experimentProgress.clone()); } if (buckets != null) { Map<Bucket.Label, BucketStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } if (actionProgress != null) { Map<Event.Name, ActionProgress> clonedActions = new HashMap<>(); for (Entry<Name, ActionProgress> entry : actionProgress.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionProgress(clonedActions); } return cloned; }  }
ExperimentStatistics extends AbstractContainerStatistics { @Override public ExperimentStatistics clone() { ExperimentStatistics cloned = (ExperimentStatistics) super.clone(); if (jointProgress != null) { cloned.setJointProgress(jointProgress.clone()); } if (experimentProgress != null) { cloned.setExperimentProgress(experimentProgress.clone()); } if (buckets != null) { Map<Bucket.Label, BucketStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } if (actionProgress != null) { Map<Event.Name, ActionProgress> clonedActions = new HashMap<>(); for (Entry<Name, ActionProgress> entry : actionProgress.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionProgress(clonedActions); } return cloned; }  Map<Bucket.Label, BucketStatistics> getBuckets(); void setBuckets(Map<Bucket.Label, BucketStatistics> value); Progress getExperimentProgress(); void setExperimentProgress(Progress value); Progress getJointProgress(); void setJointProgress(Progress value); Map<Event.Name, ActionProgress> getActionProgress(); void setActionProgress(Map<Event.Name, ActionProgress> value); @JsonIgnore void addToBucketStatistics(Bucket.Label bucketLabel, BucketStatistics item); @JsonIgnore void addToActionProgress(Event.Name actionName, ActionProgress item); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ExperimentStatistics clone(); }
ExperimentStatistics extends AbstractContainerStatistics { @Override public ExperimentStatistics clone() { ExperimentStatistics cloned = (ExperimentStatistics) super.clone(); if (jointProgress != null) { cloned.setJointProgress(jointProgress.clone()); } if (experimentProgress != null) { cloned.setExperimentProgress(experimentProgress.clone()); } if (buckets != null) { Map<Bucket.Label, BucketStatistics> clonedBuckets = new HashMap<>(); for (Entry<Label, BucketStatistics> entry : buckets.entrySet()) { clonedBuckets.put(entry.getKey(), entry.getValue().clone()); } cloned.setBuckets(clonedBuckets); } if (actionProgress != null) { Map<Event.Name, ActionProgress> clonedActions = new HashMap<>(); for (Entry<Name, ActionProgress> entry : actionProgress.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionProgress(clonedActions); } return cloned; }  Map<Bucket.Label, BucketStatistics> getBuckets(); void setBuckets(Map<Bucket.Label, BucketStatistics> value); Progress getExperimentProgress(); void setExperimentProgress(Progress value); Progress getJointProgress(); void setJointProgress(Progress value); Map<Event.Name, ActionProgress> getActionProgress(); void setActionProgress(Map<Event.Name, ActionProgress> value); @JsonIgnore void addToBucketStatistics(Bucket.Label bucketLabel, BucketStatistics item); @JsonIgnore void addToActionProgress(Event.Name actionName, ActionProgress item); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ExperimentStatistics clone();  }