@@ -0,0 +1,769 @@
+package com.opentable.logging;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.FilterOutputStream;%0Aimport java.io.OutputStream;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport ch.qos.logback.classic.Level;%0Aimport ch.qos.logback.classic.spi.LoggingEvent;%0A%0Apublic class JsonLogEncoderTest%0A%7B%0A    @Test%0A    public void testNoCloseOutputStream() throws Exception %7B%0A        JsonLogEncoder jle = new JsonLogEncoder();%0A        OutputStream os = new FilterOutputStream(new ByteArrayOutputStream()) %7B%0A            @Override%0A            public void close() %7B%0A                Assert.fail(%22Close called%22);%0A            %7D%0A        %7D;%0A        jle.init(os);%0A%0A        LoggingEvent le = new LoggingEvent();%0A        le.setLevel(Level.ERROR);%0A        jle.doEncode(le);%0A    %7D%0A%7D%0A

Test for #5 -- show that we close our OutputStream incorrectly