### Question:
LoggerImpl implements Logger { @Override public void error(final CharSequence message) { log(clazz, Severity.ERROR, message, null); } private  LoggerImpl(final Class<?> clazz); static LoggerImpl get(final Class<?> clazz); @Override void error(final CharSequence message); @Override void error(final CharSequence message, final Throwable throwable); @Override void error(final CharSequence message, final Object arg0, final Throwable throwable); @Override void error(final CharSequence message, final Object arg0, final Object arg1,
                    final Throwable throwable); @Override void error(final CharSequence message, final Object arg0, final Object arg1,
                    final Object arg2, final Throwable throwable); @Override void error(final CharSequence message, final Object arg0, final Object arg1,
                    final Object arg2, final Object arg3, final Throwable throwable); @Override void error(final CharSequence message, final Object arg0, final Object arg1,
                    final Object arg2, final Object arg3, final Object arg4,
                    final Throwable throwable); @Override void error(final CharSequence message, final Object arg0, final Object arg1,
                    final Object arg2, final Object arg3, final Object arg4, final Object arg5,
                    final Throwable throwable); @Override void error(final CharSequence message, final Object arg0, final Object arg1,
                    final Object arg2, final Object arg3, final Object arg4, final Object arg5,
                    final Object arg6, final Throwable throwable); @Override void warning(final CharSequence message, final Object ... args); @Override void info(final CharSequence message, final Object ... args); @Override void debug(final CharSequence message, final Object ... args);  }### Answer:
@Test public void testLogThrowableWithoutArguments() throws Exception { final Throwable toBeThrown = new Throwable("fail"); final String toBeThrownToString = toString(toBeThrown); subject.error("test", toBeThrown); assertThat(new String(err.toByteArray(), UTF_8), is("com.sap.jma.logging.LoggerImplTest#ERROR: test\n" + toBeThrownToString)); }
@Test public void testLogThrowableWithArguments() throws Exception { final Throwable toBeThrown = new Throwable("fail"); final String toBeThrownToString = toString(toBeThrown); subject.error("test %s%s%s%s%s", "a", "b", "c", "d", "e", toBeThrown); assertThat(new String(err.toByteArray(), UTF_8), is("com.sap.jma.logging.LoggerImplTest#ERROR: test abcde\n" + toBeThrownToString)); }
@Test @SuppressWarnings("checkstyle:AvoidEscapedUnicodeCharacters") public void testUtf8() { subject.error("\u0048\u0065\u006C\u006C\u006F World"); assertThat(err, containsLines(LoggerImplTest.class.getName() + "#ERROR: Hello World")); }