DefaultHttpSession implements HttpSession { @Override public Enumeration<String> getAttributeNames() { verifyValid("getAttributeNames"); return Collections.enumeration(attributes.keySet()); } DefaultHttpSession(ServletContext servletContext);  DefaultHttpSession(ServletContext servletContext, String id, boolean newFlag); @Override Object getAttribute(String name); @Override Enumeration<String> getAttributeNames(); @Override long getCreationTime(); @Override String getId(); @Override long getLastAccessedTime(); @Override int getMaxInactiveInterval(); @Override ServletContext getServletContext(); @Override HttpSessionContext getSessionContext(); @Override Object getValue(String name); @Override String[] getValueNames(); @Override void invalidate(); @Override boolean isNew(); @Override void putValue(String name, Object value); @Override void removeAttribute(String name); @Override void removeValue(String name); @Override void setAttribute(String name, Object value); void setId(String id); @Override void setMaxInactiveInterval(int maxInactiveInterval); void setNew(boolean newFlag); void setSessionManager(HttpSessionManager sessionManager);  }
@Test void testGetAttributeNames() { DefaultWebApplication webApp = new DefaultWebApplication(); DefaultHttpSession session = new DefaultHttpSession(webApp); assertFalse(session.getAttributeNames().hasMoreElements()); }