CatalogProvUtilsImpl implements CatalogProvUtils { @Override public void removeActivity(Activity activity) { if (activity != null) { provenanceService.deleteActivity(activity.getResource()); } }  @Override CreateActivity startCreateActivity(User user); @Override void endCreateActivity(CreateActivity createActivity, Resource recordIRI); @Override DeleteActivity startDeleteActivity(User user, Resource recordIri); @Override void endDeleteActivity(DeleteActivity deleteActivity, Record record); @Override void removeActivity(Activity activity);  }
@Test public void removeActivityTest() throws Exception { utils.removeActivity(createActivity); verify(provenanceService).deleteActivity(createActivity.getResource()); }
@Test public void removeActivityWithNullTest() throws Exception { utils.removeActivity(null); verify(provenanceService, times(0)).deleteActivity(any(Resource.class)); }