    @Test
    public void testSetEncodingOnOutputStream() throws Exception {

        handler = new ConsoleHandler(Target.CONSOLE, NO_FORMATTER);
        handler.setErrorManager(AssertingErrorManager.of());
        handler.setWriter(out);
        handler.setEncoding("UTF-8");
        assertThat(handler.getEncoding(), is("UTF-8"));
        handler.publish(new ExtLogRecord(Level.INFO, "Hello World", getClass().getName()));
        assertThat(out.toString(), is("Hello World"));
    }