### Question:
AbstractContextAwareSingletonBeanDependentTag extends TagSupport { protected RenderContext getContext() { RenderContext context = (RenderContext)this.pageContext.getRequest().getAttribute(CONTEXT_KEY); if(context == null) { context = new RenderContext(); context.setProperties(new HashMap()); this.pageContext.getRequest().setAttribute(CONTEXT_KEY, context); } return context; } protected  AbstractContextAwareSingletonBeanDependentTag(Class<T> clazz);   }### Answer:
@Test public void getContext() { pageContext = createNiceMock(PageContext.class); ServletRequest request = createNiceMock(ServletRequest.class); replay(request); expect(pageContext.getRequest()).andReturn(request).anyTimes(); replay(pageContext); tag.setPageContext(pageContext); RenderContext context = tag.getContext(); assertThat(context, is(not(nullValue()))); assertThat(context.getProperties(), is(not(nullValue()))); }