SessionCacheFetcher extends CacheFetcher { @Override protected Object computeResult() { return SessionTokenUtils.getSessionFromRawToken(rawToken); } SessionCacheFetcher(String rawToken);   }
@Test public void testComputeResult() { Session session = createSession(); String rawToken = SessionTokenUtils.marshallSessionToken(session); SessionCacheFetcher fetcher = new SessionCacheFetcher(rawToken); Session computed = (Session) fetcher.computeResult(); assertEquals(session.getId(), computed.getId()); }