### Question:
AbstractMode extends TagSupport { @Override public final int doStartTag() throws JspException { if (!isRequestInMode()) { return SKIP_BODY; } return EVAL_BODY_INCLUDE; }  @Override final int doEndTag(); @Override final int doStartTag(); @Override void release(); final void setNot(final boolean not);  }### Answer:
@Test public void test_with_null_wcmmode() throws Exception { assertEquals(TagSupport.SKIP_BODY, getTag().doStartTag()); }
@Test public void test_with_correct_wcmmode() throws Exception { when(request.getAttribute(WCMMode.REQUEST_ATTRIBUTE_NAME)).thenReturn(getCorrectMode()); assertEquals(TagSupport.EVAL_BODY_INCLUDE, getTag().doStartTag()); }
@Test public void test_with_wrong_wcmmode() throws Exception { when(request.getAttribute(WCMMode.REQUEST_ATTRIBUTE_NAME)).thenReturn(getWrongMode()); assertEquals(TagSupport.SKIP_BODY, getTag().doStartTag()); }