RepositoryBackedSession { @SuppressWarnings({ "rawtypes" }) public Enumeration getAttributeNames() { assertValid(); List<String> keys = getAttributeNamesWithValues(); for (String key : getAllRepositoryKeys()) { if (!attrs.containsKey(key)) { keys.add(key); } } return Collections.enumeration(keys); } RepositoryBackedSession(SessionData sessionData, SessionManager manager, SessionFactory factory); protected  RepositoryBackedSession(RepositoryBackedSession linked); void setMaxInactiveInterval(int maxInactiveInterval); Object getAttribute(String key); @SuppressWarnings({ "rawtypes" }) Enumeration getAttributeNames(); List<String> getAttributeNamesWithValues(); long getCreationTime(); String getId(); long getLastAccessedTime(); int getMaxInactiveInterval(); void invalidate(); void doInvalidate(boolean expired); boolean isNew(); void removeAttribute(String name); Attribute getAttributeFromCache(String name); void setAttribute(String key, Object value); synchronized void commit(); boolean isValid(); boolean isExpired(); boolean isDirty(); Runnable getCommitter(); SessionData getSessionData(); boolean isCommitted(); void setCommitted(boolean committed); SessionManager getSessionManager(); int getConcurrentUses();  }
@SuppressWarnings("unchecked") @Test public void testGetAttributeNames() { RepositoryBackedSession rbs = new RepositoryBackedSession(sessionData, manager, factory); rbs.setAttribute("Test", "value"); rbs.setAttribute("Test2", "value"); ArrayList<String> names = Collections.list(rbs.getAttributeNames()); assertThat(names, hasItems("Test", "Test2")); }