@Test
public void testEndOuterElement() throws Exception {

    Page<String> page = mock(Page.class);
    // set mock behavior
    when(page.getNumber()).thenReturn(0);
    when(page.getSize()).thenReturn(0);
    when(page.getTotalPages()).thenReturn(0);
    when(page.getTotalElements()).thenReturn(1L);
    tag.setPage(page);
    tag.setFirstLinkText("");
    tag.setLastLinkText("");
    tag.setPreviousLinkText("");
    tag.setNextLinkText("");
    int ret = tag.doStartTagInternal();
    assertThat(ret, is(TagSupport.EVAL_BODY_INCLUDE));
    String expected = "<ul></ul>";
    assertThat(getOutput(), is(expected));
}