verify(repository, pageContext, servletContext, wContext, writer);
}
@Test
public void doStartTag_novar() throws IOException, JspException {
Person p = new PersonImpl();
p.setUsername("FOO");
expect(repository.get(VALID_ID)).andReturn(p);
expect(pageContext.getServletContext()).andReturn(servletContext).anyTimes();
expect(servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(wContext).anyTimes();
expect(wContext.getBean(PersonRepository.class)).andReturn(repository).anyTimes();
expect(pageContext.getOut()).andReturn(writer).anyTimes();
writer.print(p.getUsername());
expectLastCall();
replay(repository, pageContext, servletContext, wContext, writer);
tag.setId(VALID_ID);
int result = tag.doEndTag();