### Question:
Log { public static <T extends Throwable> T logErr(T throwable) { return Env.log().logErr(throwable); } private  Log(); static Func1<T, T> tab(); static Func1<T, T> tab(Object prefix); static Func1<T, T> tabf(String format); static T log(T value); static T log(Object prefix, T value); static T log(Object prefix, T value, Object suffix); @SuppressWarnings("unchecked") static FuncList<T> logEach(T ... values); static FuncList<T> logEach(String prefix, Collection<T> values); static FuncList<T> logEach(String prefix, Collection<T> values, String suffix); static T logBy(Supplier<T> supplier); static T logErr(T throwable); static T logErr(Object prefix, T throwable); static T logErr(Object prefix, T throwable, Object suffix);  }### Answer:
@Test public void testLogErr() { val stub = new Console.Stub(); With(Env.refs.console.butWith(stub)) .run(()->{ try { throw new NullPointerException("NULL!!!"); } catch (Exception e) { Log.logErr("Error!", e); } val expected = "Error!\n" + "java.lang.NullPointerException: NULL!!!"; assertEquals(expected, stub.errLines().limit(2).joinToString("\n")); }); }