@Test(expected = ConfigurationException.class)
public void throwsExceptionOnUnresolvedAppender() {

    // given
    Appender appender = mock(Appender.class);
    when(appender.isStarted()).thenReturn(true);
    Configuration configuration = mock(Configuration.class);
    String testAppenderRef = "testAppenderRef";
    when(configuration.getAppender(testAppenderRef)).thenReturn(null);
    FailoverPolicy<String> failoverPolicy = createTestFailoverPolicy(testAppenderRef, configuration);
    String failedMessage = "test failed message";
    // when
    failoverPolicy.deliver(failedMessage);
}