PaginationTag extends RequestContextAwareTag { protected void endOuterElement(TagWriter tagWriter) throws JspException { if (StringUtils.hasText(outerElement)) { tagWriter.endTag(true); } }  @Override void release(); void setPage(Object page); void setPathTmpl(String pathTmpl); void setQueryTmpl(String queryTmpl); void setCriteriaQuery(String criteriaQuery); void setDisableHtmlEscapeOfCriteriaQuery(
            String disableHtmlEscapeOfCriteriaQuery); void setEnableLinkOfCurrentPage(
            String enableLinkOfCurrentPage); void setMaxDisplayCount(int maxDisplayCount); void setOuterElement(String outerElement); void setOuterElementClass(String outerElementClass); void setInnerElement(String innerElement); void setInnerElementClass(String innerElementClass); void setFirstLinkText(String firstLinkText); void setPreviousLinkText(String previousLinkText); void setNextLinkText(String nextLinkText); void setLastLinkText(String lastLinkText); void setDisabledHref(String disabledHref); void setActiveClass(String activeClass); void setDisabledClass(String disabledClass);  }
@Test public void testEndOuterElement() throws Exception { Page<String> page = mock(Page.class); 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)); }