### Question:
DefaultHttpSessionManager implements HttpSessionManager, SessionCookieConfig { @Override public synchronized HttpSession createSession(HttpServletRequest request) { String sessionId = UUID.randomUUID().toString(); DefaultHttpSession session = new DefaultHttpSession(webApplication, sessionId, true); session.setSessionManager(this); sessions.put(sessionId, session); HttpServletResponse response = (HttpServletResponse) webApplication.getResponse(request); Cookie cookie = new Cookie(name, sessionId); if (path != null) { cookie.setPath(path); } else { cookie.setPath("".equals(webApplication.getContextPath()) ? "/" : webApplication.getContextPath()); } response.addCookie(cookie); sessionListeners.stream().forEach(sessionListener -> sessionListener.sessionCreated(new HttpSessionEvent(session))); return session; } DefaultHttpSessionManager(); @Override synchronized HttpSession createSession(HttpServletRequest request); @Override HttpSession getSession(HttpServletRequest request, String currentSessionId); @Override String changeSessionId(HttpServletRequest request); @Override void addListener(T listener); @Override void attributeAdded(HttpSession session, String name, Object value); @Override void attributeReplaced(HttpSession session, String name, Object oldValue, Object newValue); @Override void attributeRemoved(HttpSession session, String name, Object value); @Override synchronized void destroySession(HttpSession session); @Override String encodeRedirectURL(HttpServletResponse response, String url); @Override String encodeURL(HttpServletResponse response, String url); @Override String getComment(); @Override Set<SessionTrackingMode> getDefaultSessionTrackingModes(); @Override String getDomain(); @Override Set<SessionTrackingMode> getEffectiveSessionTrackingModes(); @Override int getMaxAge(); @Override String getName(); @Override String getPath(); @Override SessionCookieConfig getSessionCookieConfig(); @Override int getSessionTimeout(); @Override boolean hasSession(String sessionId); @Override boolean isHttpOnly(); @Override boolean isSecure(); @Override void setComment(String comment); @Override void setDomain(String domain); @Override void setHttpOnly(boolean httpOnly); @Override void setMaxAge(int maxAge); @Override void setName(String name); @Override void setPath(String path); @Override void setSecure(boolean secure); @Override void setSessionTimeout(int sessionTimeout); @Override void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes); @Override void setWebApplication(WebApplication webApplication);  }### Answer:
@Test void testCreateSession() { DefaultHttpSessionManager sessionManager = new DefaultHttpSessionManager(); DefaultWebApplication webApp = new DefaultWebApplication(); assertThrows(NullPointerException.class, () -> sessionManager.createSession(null)); }