@Test
void getTemporaryDirectoryWhenServletTempDirNotSet() throws Exception
{

    ServletContext servletContext = mock(ServletContext.class);
    this.environment.setServletContext(servletContext);
    assertEquals(this.systemTmpDir.getCanonicalFile(),
        this.environment.getTemporaryDirectory().getCanonicalFile());
    // Verify that servletContext.getAttribute was called (and that we returned null - this happens because we
    // didn't set any stubbing on servletContext and null is the default returned by Mockito).
    verify(servletContext).getAttribute("javax.servlet.context.tempdir");
}