    @Test
    public void testLogWarngWithThrowable() throws Exception {

        final Exception exception = new Exception();

        when(logger.isWarnEnabled()).thenReturn(true);
        when(ctx.level()).thenReturn(LogLevel.WARN);
        when(ctx.throwable()).thenReturn(exception);

        output.write(ctx);

        Mockito.verify(logger).warn(anyString(), eq(exception));
    }