@Test public void get_attribute_names() { Enumeration e = Collections.enumeration(Arrays.asList("fred", "barney")); HttpSession hs = mockHttpSession(); SessionLock lock = mockLock(); lock.acquireReadLock(); expect(hs.getAttributeNames()).andReturn(e); replay(); Session session = new SessionImpl(null, hs, lock); assertEquals(session.getAttributeNames(), Arrays.asList("barney", "fred")); verify(); }
public List<String> getAttributeNames() { lock.acquireReadLock(); return InternalUtils.toList(session.getAttributeNames()); }
SessionImpl implements Session { public List<String> getAttributeNames() { lock.acquireReadLock(); return InternalUtils.toList(session.getAttributeNames()); } }
SessionImpl implements Session { public List<String> getAttributeNames() { lock.acquireReadLock(); return InternalUtils.toList(session.getAttributeNames()); } SessionImpl(HttpServletRequest request, HttpSession session, SessionLock lock); }
SessionImpl implements Session { public List<String> getAttributeNames() { lock.acquireReadLock(); return InternalUtils.toList(session.getAttributeNames()); } SessionImpl(HttpServletRequest request, HttpSession session, SessionLock lock); Object getAttribute(String name); List<String> getAttributeNames(); void setAttribute(String name, Object value); List<String> getAttributeNames(String prefix); int getMaxInactiveInterval(); void invalidate(); boolean isInvalidated(); void setMaxInactiveInterval(int seconds); void restoreDirtyObjects(); }
SessionImpl implements Session { public List<String> getAttributeNames() { lock.acquireReadLock(); return InternalUtils.toList(session.getAttributeNames()); } SessionImpl(HttpServletRequest request, HttpSession session, SessionLock lock); Object getAttribute(String name); List<String> getAttributeNames(); void setAttribute(String name, Object value); List<String> getAttributeNames(String prefix); int getMaxInactiveInterval(); void invalidate(); boolean isInvalidated(); void setMaxInactiveInterval(int seconds); void restoreDirtyObjects();  }