### Question:
MarkupToEclipseHelpMojo extends AbstractMojo { protected void configureStylesheets(HtmlDocumentBuilder builder, String relativePath) { for (String cssStylesheetUrl : stylesheetUrls) { builder.addCssStylesheet( new HtmlDocumentBuilder.Stylesheet(computeResourcePath(cssStylesheetUrl, relativePath))); } }  void execute();  }### Answer:
@Test public void configureStylesheetUrls() { markupToEclipseHelp.stylesheetUrls = Arrays.asList("test/foo.css", "bar.css"); HtmlDocumentBuilder builder = mock(HtmlDocumentBuilder.class); markupToEclipseHelp.configureStylesheets(builder, ""); verify(builder, times(2)).addCssStylesheet(any(Stylesheet.class)); }
@Test public void configureStylesheetUrlsWithRelativePath() { markupToEclipseHelp.stylesheetUrls = Arrays.asList("bar.css"); HtmlDocumentBuilder builder = mock(HtmlDocumentBuilder.class); markupToEclipseHelp.configureStylesheets(builder, "one/two"); ArgumentCaptor<Stylesheet> captor = ArgumentCaptor.forClass(Stylesheet.class); verify(builder).addCssStylesheet(captor.capture()); assertEquals("../../bar.css", captor.getValue().getUrl()); }