PaginationTag extends RequestContextAwareTag { protected void writeAnchor(TagWriter tagWriter, String href, String value) throws JspException { if (StringUtils.hasText(href)) { tagWriter.startTag(PaginationInfo.A_ELM); tagWriter.writeAttribute(PaginationInfo.HREF_ATTR, href); tagWriter.appendValue(value); tagWriter.endTag(true); } else { tagWriter.appendValue(value); } }  @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 testWriteAnchor() throws Exception { tag.writeAnchor(tag.createTagWriter(), PaginationInfo.DEFAULT_DISABLED_HREF, ""); String expected = "<a href=\"javascript:void(0)\"></a>"; assertThat(getOutput(), is(expected)); }