ToolkitPresenter { public void onSourceCodeKeyTyped() { view.displayAst(null); view.displayXml(""); view.clearSourceCodeHighlights(); view.disableXPathEvaluateButton(); } ToolkitPresenter(ConfigurationModel configurationModel, SourceCodeModel model); void setView(ToolkitView view); void run(String title); void onSourceCodeOpenButtonClick(); void onSourceCodeParseButtonClick(); void onXPathEvaluateButtonClick(); void onSourceCodeKeyTyped(); void onSourceCodeTextCursorMoved(); void onAstSelectionChanged(); void onConfigurationPropertyFocusLost(String name);  }
@Test public void onSourceCodeKeyTyped() { ToolkitView view = mock(ToolkitView.class); ToolkitPresenter presenter = new ToolkitPresenter(mock(ConfigurationModel.class), mock(SourceCodeModel.class)); presenter.setView(view); presenter.onSourceCodeKeyTyped(); verify(view).displayAst(null); verify(view).displayXml(""); verify(view).clearSourceCodeHighlights(); verify(view).disableXPathEvaluateButton(); }