### Question:
LessAnnoyingSMTPAppender extends AppenderBase<ILoggingEvent> { @Override protected void append(ILoggingEvent event) { try { if (! eventEvaluator.evaluate(event)) return; appendEvaluatedEvent(event); } catch (NullPointerException ignore) { } catch (EvaluationException ignore) { } } 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 doesNothingOnEvaluationException() throws EvaluationException { final ILoggingEvent event = new LoggingEvent(); context.checking(new Expectations() {{ oneOf(eventEvaluator).evaluate(event); will(throwException(new EvaluationException("This is a test"))); }}); appender.append(event); }
@Test public void doesNothingWhenEventIsEvaluatedNegatively() throws EvaluationException { final ILoggingEvent event = new LoggingEvent(); context.checking(new Expectations() {{ oneOf(eventEvaluator).evaluate(event); will(returnValue(false)); }}); appender.append(event); }
@Test public void doesNothingOnNullPointerExceptionByEventEvaluator() throws EvaluationException { final ILoggingEvent event = new LoggingEvent(); context.checking(new Expectations() {{ oneOf(eventEvaluator).evaluate(event); will(throwException(new NullPointerException("This is a test"))); }}); appender.append(event); }