MailReport { public static void scheduleReportMailForLocalServer(Collector collector, Timer timer) { assert collector != null; assert timer != null; for (final Period period : getMailPeriods()) { scheduleReportMailForLocalServer(collector, timer, period); } }  static void scheduleReportMailForLocalServer(Collector collector, Timer timer); static List<Period> getMailPeriods(); static Date getNextExecutionDate(Period period); void sendReportMailForLocalServer(Collector collector, Period period); void sendReportMail(Collector collector, boolean collectorServer,
			List<JavaInformations> javaInformationsList, Period period);  }
@Test public void testScheduleReportMail() { final Timer timer = new Timer("test timer", true); try { final Counter counter = new Counter("http", null); final Collector collector = new Collector("test", Collections.singletonList(counter)); MailReport.scheduleReportMailForLocalServer(collector, timer); } finally { timer.cancel(); } assertNotNull("MailReport", timer.purge()); }