### Question:
Report { public static void warn(String message) { STUB.get().warn(message); } private  Report(); static void info(String message); static void info(String message, Throwable throwable); static void warn(String message); static void warn(String message, Throwable throwable); static void error(String message); static void error(String message, Throwable throwable); static ApiStub<ReportApi> getStub(); static final String K_DELEGATE_CLASS; }### Answer:
@Test public void warn() { delegate(new Mock()); Report.warn("Hello"); assertThat(Mock.levels, is(list(Level.WARN))); assertThat(Mock.messages, is(list("Hello"))); }
@Test(expected = Report.FailedException.class) public void warn_error() { delegate(new Report.Delegate() { @Override public void report(Level level, String message) throws IOException { throw new IOException(); } }); Report.warn("Hello"); }