*/
@Test
public void testRender() throws IOException {
Request request = createMock(Request.class);
Writer writer = createMock(Writer.class);
ApplicationContext applicationContext = createMock(ApplicationContext.class);
ApplicationResource applicationResource = createMock(ApplicationResource.class);
expect(applicationResource.getInputStream()).andReturn(getClass().getResource("/test.html").openStream());
Map<String,Object> context = Collections.singletonMap("testKey", (Object)"test value");
expect(request.getApplicationContext()).andReturn(applicationContext);
expect(applicationContext.getResource(isA(String.class))).andReturn(applicationResource).anyTimes();
expect(request.getAvailableScopes()).andReturn(Arrays.asList(Request.REQUEST_SCOPE, "session", Request.APPLICATION_SCOPE));
expect(request.getContext(Request.REQUEST_SCOPE)).andReturn(context);
expect(request.getContext("session")).andReturn(Collections.<String,Object>emptyMap());
expect(request.getContext(Request.APPLICATION_SCOPE)).andReturn(Collections.<String,Object>emptyMap());
expect(request.getWriter()).andReturn(writer);