@Test void getTemporaryDirectoryWhenServletTempDirNotSet() throws Exception { ServletContext servletContext = mock(ServletContext.class); this.environment.setServletContext(servletContext); assertEquals(this.systemTmpDir.getCanonicalFile(), this.environment.getTemporaryDirectory().getCanonicalFile()); verify(servletContext).getAttribute("javax.servlet.context.tempdir"); }
public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; }
ServletEnvironment extends AbstractEnvironment { public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } }
ServletEnvironment extends AbstractEnvironment { public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; }  }
ServletEnvironment extends AbstractEnvironment { public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; }  void setServletContext(ServletContext servletContext); ServletContext getServletContext(); @Override InputStream getResourceAsStream(String resourceName); @Override URL getResource(String resourceName); }
ServletEnvironment extends AbstractEnvironment { public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; }  void setServletContext(ServletContext servletContext); ServletContext getServletContext(); @Override InputStream getResourceAsStream(String resourceName); @Override URL getResource(String resourceName);  }