ServletContextAdapter implements ServletContext { public String getMimeType(String string) { return rootContext.getMimeType(string); } @SuppressWarnings("unchecked")  ServletContextAdapter(ServletConfig config); ServletContext getContext(String string); int getMajorVersion(); int getMinorVersion(); String getMimeType(String string); @SuppressWarnings({ "rawtypes" }) Set getResourcePaths(String string); URL getResource(String string); InputStream getResourceAsStream(String string); RequestDispatcher getRequestDispatcher(String string); RequestDispatcher getNamedDispatcher(String string); Servlet getServlet(String string); @SuppressWarnings("rawtypes") Enumeration getServlets(); @SuppressWarnings("rawtypes") Enumeration getServletNames(); void log(String string); void log(Exception exception, String string); void log(String string, Throwable throwable); String getRealPath(String string); String getServerInfo(); String getInitParameter(String string); @SuppressWarnings("rawtypes") Enumeration getInitParameterNames(); Object getAttribute(String string); @SuppressWarnings("rawtypes") Enumeration getAttributeNames(); void setAttribute(String string, Object object); void removeAttribute(String string); String getServletContextName(); String getContextPath();  }
@Test public void testGetMimeType() { expect(servletContext.getMimeType("whatever")).andReturn("mymime"); replay(servletContext, config); ServletContextAdapter adapter = new ServletContextAdapter(config); assertEquals("mymime", adapter.getMimeType("whatever")); }