### Question:
LessAnnoyingSMTPAppender extends AppenderBase<ILoggingEvent> { protected synchronized void appendEvaluatedEvent(ILoggingEvent event) { cacheLoggingEvent(event); if (countCachedEvents() == 1) postman.send(event); else { scheduler.runAtTheStrokeOfTheNextHour(new TimerTask() { @Override public void run() { LessAnnoyingSMTPAppender.this.onNextHour(); } }); } } LessAnnoyingSMTPAppender();   LessAnnoyingSMTPAppender(Postman postman, Scheduler scheduler); EventEvaluator<ILoggingEvent> getEventEvaluator(); void setEventEvaluator(EventEvaluator<ILoggingEvent> eventEvaluator); String getSmtpHost(); void setSmtpHost(String smtpHost); int getSmtpPort(); void setSmtpPort(int smtpPort); boolean isSsl(); void setSsl(boolean ssl); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); String getFrom(); void setFrom(String from); String getFirstEventSubject(); void setFirstEventSubject(String firstEventSubject); String getFirstEventBodyTemplate(); void setFirstEventBodyTemplate(String firstEventBodyTemplate); void setTo(String to); @Override void start();  }### Answer:
@Test public void notifyTheFirstEventOccured() { final ILoggingEvent event = new LoggingEvent(); context.checking(new Expectations() {{ oneOf(postman).send(event); }}); appender.appendEvaluatedEvent(event); }