*/
@Test
public void testWrite() throws IOException, ServletException {
ApplicationContext applicationContext = createMock(ServletApplicationContext.class);
ServletContext servletContext = createMock(ServletContext.class);
GenericServlet servlet = createMockBuilder(GenericServlet.class).createMock();
ServletConfig servletConfig = createMock(ServletConfig.class);
ObjectWrapper objectWrapper = createMock(ObjectWrapper.class);
expect(servletConfig.getServletContext()).andReturn(servletContext);
replay(servlet, servletConfig);
servlet.init(servletConfig);
ServletContextHashModel servletContextHashModel = new ServletContextHashModel(servlet, objectWrapper);
expect(applicationContext.getContext()).andReturn(servletContext).anyTimes();
expect(servletContext.getRealPath(isA(String.class))).andReturn(null).anyTimes();
URL resource = getClass().getResource("/test.ftl");