@Test
public void shouldFailWithOLATRuntimeExceptionWithAnUnhandletSendFailedException(){

	//setup
	ExceptionHandlingMailSendingTemplate doSendWithSendFailedException = new ExceptionHandlingMailSendingTemplate() {
		@Override
		protected boolean doSend(Emailer emailer) throws AddressException, SendFailedException, MessagingException {
			assertNotNull("emailer was constructed", emailer);
			MessagingException firstInnerException = new SendFailedException("unhandled sendfail exception");
			throw new SendFailedException(BY_OLAT_UNHANDLED_TEXT, firstInnerException);
		}
		
		@Override
		protected MailTemplate getMailTemplate() {
			return emptyMailTemplate;
		};
		
		@Override
		protected List<ContactList> getTheToContactLists() {
			return theContactLists;
		}
		
		@Override
		protected Identity getFromIdentity() {
			return theFromIdentity;
		}
	};

	//exercise
	try{	
		MessageSendStatus sendStatus = doSendWithSendFailedException.send();
		fail("OLATRuntime exception is not thrown.");
	}catch(OLATRuntimeException ore){
		assertNotNull(ore);
	}
	
}