public void testPublisher() throws IOException, InterruptedException {
    AbstractBuild<?, ?> build = createBuild(15, GregorianCalendar.getInstance());

    File root = SystemUtils.getJavaIoTmpDir();
    FilePath rootPath = new FilePath(root);

    final AbstractProject<?, ?> project = mock(AbstractProject.class);
    stub(project.getRootDir()).toReturn(root);
    stub(project.getModuleRoot()).toReturn(rootPath);

    Publisher publisher =
        new FreestylePublisher("reports.xml", "", "", "100", "10") {

          protected AbstractProject getProject(AbstractBuild build) {
            return project;
          }
        };
    publisher.perform(build, null, null);
  }