@Test public void testGetDefaultDescription() throws Exception { Mockito.when(experiment.getLabel()).thenReturn(experimentLabel); Mockito.when(experimentLabel.toString()).thenReturn("UnitTestExperiment"); Mockito.when(bucket.getLabel()).thenReturn(bucketLabel); Mockito.when(bucketLabel.toString()).thenReturn("UnitTestBucket"); BucketCreateEvent systemEvent = new BucketCreateEvent(experiment, bucket); Assert.assertEquals(EventLog.SYSTEM_USER.getUsername() + " created bucket UnitTestExperiment.UnitTestBucket.", systemEvent.getDefaultDescription()); }
@Override public String getDefaultDescription() { return getUser().getUsername() + " created bucket " + getExperiment().getLabel() + "." + getBucket().getLabel() + "."; }
BucketCreateEvent extends AbstractEvent implements BucketEvent, CreateEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " created bucket " + getExperiment().getLabel() + "." + getBucket().getLabel() + "."; } }
BucketCreateEvent extends AbstractEvent implements BucketEvent, CreateEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " created bucket " + getExperiment().getLabel() + "." + getBucket().getLabel() + "."; } BucketCreateEvent(ExperimentBase experiment, Bucket bucket);  BucketCreateEvent(UserInfo user, ExperimentBase experiment, Bucket bucket); }
BucketCreateEvent extends AbstractEvent implements BucketEvent, CreateEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " created bucket " + getExperiment().getLabel() + "." + getBucket().getLabel() + "."; } BucketCreateEvent(ExperimentBase experiment, Bucket bucket);  BucketCreateEvent(UserInfo user, ExperimentBase experiment, Bucket bucket); @Override ExperimentBase getExperiment(); @Override Bucket getBucket(); @Override String getDefaultDescription(); @Override Application.Name getApplicationName(); }
BucketCreateEvent extends AbstractEvent implements BucketEvent, CreateEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " created bucket " + getExperiment().getLabel() + "." + getBucket().getLabel() + "."; } BucketCreateEvent(ExperimentBase experiment, Bucket bucket);  BucketCreateEvent(UserInfo user, ExperimentBase experiment, Bucket bucket); @Override ExperimentBase getExperiment(); @Override Bucket getBucket(); @Override String getDefaultDescription(); @Override Application.Name getApplicationName();  }