@Test
public void doGet() throws IOException {

    final List<SiteMapEntry> entries = new LinkedList<>();
    SiteMapEntry entry = new SiteMapEntry("/content/page-1");
    entry.setUrl("http://www.example.com/page-1.html");
    entries.add(entry);
    entry = new SiteMapEntry("/content/page-2");
    entry.setUrl("/page-2.html");
    entries.add(entry);
    when(structure.get(resource)).thenReturn(entries);
    model.doGet(request, response);
    assertNotEquals(HttpServletResponse.SC_NOT_FOUND, status);
    assertEquals(
            StringUtils.strip("/page-1.html /content/page-1.html\n" + "/page-2.html /content/page-2.html"),
            StringUtils.strip(writer.toString())
    );
}