@Test
public void testGetPrintWriter() {

    DispatchRequest enclosedRequest = createMock(DispatchRequest.class);
    expect(enclosedRequest.getAvailableScopes()).andReturn(Collections.singletonList("parent"));
    replay(velocityContext, enclosedRequest);
    context = new VelocityRequest(enclosedRequest, velocityContext, writer);
    assertNotNull(context.getPrintWriter());
    verify(velocityContext, enclosedRequest);
}