secondMail.addTo("to@localhost");
secondMail.setFrom("from@localhost");
secondMail.setBodyText("simple body text");
// send simple mail via mocked postoffice
postoffice.send(secondMail);
// and test that mail has been sent.
assertEquals("second mail", ((PostofficeMockImpl) postoffice).getLastSentMail().getSubject());
assertTrue(((PostofficeMockImpl) postoffice).getLastSentMail().getTos()
.contains("to@localhost"));