@Test public void testLogger2() throws Exception { PrintWriter printWriter = createMock(PrintWriter.class); printWriter.println("qwe"); suppress(constructor(Logger.class)); replayAll(); Logger logger = new Logger(); Whitebox.setInternalState(logger, printWriter); logger.log("qwe"); verifyAll(); }
public void log(String message) { writer.println(message); }
Logger { public void log(String message) { writer.println(message); } }
Logger { public void log(String message) { writer.println(message); } Logger(); }
Logger { public void log(String message) { writer.println(message); } Logger(); void log(String message); }
Logger { public void log(String message) { writer.println(message); } Logger(); void log(String message);  }