ProjectDirectoryUpdater { public void updateReportingOutputDirectory(String buildDirectory) { checkArgument(buildDirectory != null, "The project build directory must not be null"); project.getModel().getReporting().setOutputDirectory(Paths.get(buildDirectory, SITE.value()).toString()); } ProjectDirectoryUpdater(MavenProject project); void updateBuildDirectory(String buildDirectory); void updateBuildOutputDirectory(String buildDirectory); void updateBuildTestOputputDirectory(String buildDirectory); void updateReportingOutputDirectory(String buildDirectory);  }
@Test(expected = IllegalArgumentException.class) public void updateReportingOutputDirectoryNullDirectory() { projectDirectoryUpdater.updateReportingOutputDirectory(null); }
@Test public void updateReportingOutputDirectory() { projectDirectoryUpdater.updateReportingOutputDirectory(DEFAULT_BUILD_DIRECTORY); verify(mavenProjectMock, times(1)).getModel(); verify(modelMock, times(1)).getReporting(); verify(reportingMock, times(1)).setOutputDirectory(Paths.get(DEFAULT_BUILD_DIRECTORY, "site").toString()); }