@Test public void noInteractionsWithProjectIfJavaPluginNotApplied() { project = Mockito.mock(Project.class, Answers.RETURNS_MOCKS.get()); JavaToJavaccDependencyAction action = new JavaToJavaccDependencyAction(); action.execute(project); Mockito.verify(project).getPlugins(); Mockito.verifyNoMoreInteractions(project); }
@Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); } }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }  }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }  @Override void execute(Project project); }
JavaToJavaccDependencyAction implements Action<Project> { @Override public void execute(Project project) { if (!project.getPlugins().hasPlugin("java")) { return; } configureCompileJJTreeTask(project); configureCompileJavaccTask(project); }  @Override void execute(Project project);  }