HarvestBandwidthManagerImpl implements HarvestBandwidthManager { @Override public void delete(BandwidthRestriction bandwidthRestriction) { auditor.audit(BandwidthRestriction.class.getName(), null, Auditor.ACTION_DELETE_BANDWIDTH_RESTRICTION, "Deleted bandwidth restriction: " + bandwidthRestriction.toString()); harvestCoordinatorDao.delete(bandwidthRestriction); }  @Override void sendBandWidthRestrictions(); @Override HashMap<Long, TargetInstance> calculateBandwidthAllocation(TargetInstance aTargetInstance); @Override HashMap<Long, TargetInstance> calculateBandwidthAllocation(); @Override long getCurrentGlobalMaxBandwidth(); @Override boolean isMiniumBandwidthAvailable(QueuedTargetInstanceDTO aTargetInstance); @Override boolean isMiniumBandwidthAvailable(TargetInstance aTargetInstance); @Override synchronized void checkForBandwidthTransition(); @Override boolean isHarvestOptimizationAllowed(); @Override BandwidthRestriction getBandwidthRestriction(Long oid); @Override void saveOrUpdate(BandwidthRestriction bandwidthRestriction); @Override void delete(BandwidthRestriction bandwidthRestriction); @Override BandwidthRestriction getBandwidthRestriction(String aDay, Date aTime); @Override HashMap<String, List<BandwidthRestriction>> getBandwidthRestrictions(); @Override int getMinimumBandwidth(); @Override void setMinimumBandwidth(int minimumBandwidth); @Override int getMaxBandwidthPercent(); @Override void setMaxBandwidthPercent(int maxBandwidthPercent); void setHarvestCoordinatorDao(HarvestCoordinatorDAO harvestCoordinatorDao); void setHarvestAgentManager(HarvestAgentManager harvestAgentManager); void setTargetInstanceDao(TargetInstanceDAO targetInstanceDao); void setAuditor(Auditor auditor); void setBandwidthCalculator(BandwidthCalculator bandwidthCalculator);  }
@Test public void testDelete() throws Exception { BandwidthRestriction mockBandwidthRestriction = mock(BandwidthRestriction.class); underTest.delete(mockBandwidthRestriction); verify(mockHarvestCoordinatorDao).delete(mockBandwidthRestriction); }