@Test public void testPut() { Authentication userAuthentication = new PreAuthenticatedAuthenticationToken(new SLIPrincipal("1234"), "auth", Arrays.asList(Right.FULL_ACCESS)); sessions.put(TOKEN, new OAuth2Authentication(new ClientToken("the", "ordinary", Collections.singleton("man")), userAuthentication)); Assert.assertNotNull(sessions.get(TOKEN)); }
public void put(String token, OAuth2Authentication auth) { if (auth != null) { this.sessions.put(new Element(token, auth)); replicate(token, auth); } else { LOG.warn("Attempting to cache null session!"); } }
SessionCache { public void put(String token, OAuth2Authentication auth) { if (auth != null) { this.sessions.put(new Element(token, auth)); replicate(token, auth); } else { LOG.warn("Attempting to cache null session!"); } } }
SessionCache { public void put(String token, OAuth2Authentication auth) { if (auth != null) { this.sessions.put(new Element(token, auth)); replicate(token, auth); } else { LOG.warn("Attempting to cache null session!"); } }  }
SessionCache { public void put(String token, OAuth2Authentication auth) { if (auth != null) { this.sessions.put(new Element(token, auth)); replicate(token, auth); } else { LOG.warn("Attempting to cache null session!"); } }  void put(String token, OAuth2Authentication auth); OAuth2Authentication get(String token); void remove(String token); void clear(); }
SessionCache { public void put(String token, OAuth2Authentication auth) { if (auth != null) { this.sessions.put(new Element(token, auth)); replicate(token, auth); } else { LOG.warn("Attempting to cache null session!"); } }  void put(String token, OAuth2Authentication auth); OAuth2Authentication get(String token); void remove(String token); void clear();  }