@Test public void testPrintOptionDescription() throws Exception { HelpFormatter helpFormatterMock = PowerMock.createMockAndExpectNew(HelpFormatter.class); helpFormatterMock.printHelp(eq("caption"), isA(Options.class)); expectLastCall().once(); OptionUser tested = new OptionUser(); Whitebox.setInternalState(tested, "options", new Options()); replay(helpFormatterMock, HelpFormatter.class); tested.printOptionDescription(); verify(helpFormatterMock, HelpFormatter.class); }
public void printOptionDescription() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("caption", options); }
OptionUser { public void printOptionDescription() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("caption", options); } }
OptionUser { public void printOptionDescription() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("caption", options); }  }
OptionUser { public void printOptionDescription() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("caption", options); }  void printOptionDescription(); }
OptionUser { public void printOptionDescription() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("caption", options); }  void printOptionDescription();  }