@Test public void shouldGetSessionFromSuppliedPippoWebContext() { when(mockRouteContext.getSession()).thenReturn(mockSession); when(mockPippoWebContext.getRouteContext()).thenReturn(mockRouteContext); PippoSessionStore sessionStore = new PippoSessionStore(); Session session = sessionStore.getSession(mockPippoWebContext); assertThat(session, is(mockSession)); verify(mockRouteContext, times(1)).getSession(); verify(mockPippoWebContext, times(1)).getRouteContext(); }
protected Session getSession(PippoWebContext pippoWebContext) { return pippoWebContext.getRouteContext().getSession(); }
PippoSessionStore implements SessionStore<PippoWebContext> { protected Session getSession(PippoWebContext pippoWebContext) { return pippoWebContext.getRouteContext().getSession(); } }
PippoSessionStore implements SessionStore<PippoWebContext> { protected Session getSession(PippoWebContext pippoWebContext) { return pippoWebContext.getRouteContext().getSession(); }  }
PippoSessionStore implements SessionStore<PippoWebContext> { protected Session getSession(PippoWebContext pippoWebContext) { return pippoWebContext.getRouteContext().getSession(); }  @Override String getOrCreateSessionId(PippoWebContext pippoWebContext); @Override Object get(PippoWebContext pippoWebContext, String name); @Override void set(PippoWebContext pippoWebContext, String name, Object value); @Override boolean destroySession(PippoWebContext pippoWebContext); @Override Object getTrackableSession(PippoWebContext pippoWebContext); @Override SessionStore<PippoWebContext> buildFromTrackableSession(PippoWebContext pippoWebContext, Object trackableSession); boolean renewSession(PippoWebContext pippoWebContext); }
PippoSessionStore implements SessionStore<PippoWebContext> { protected Session getSession(PippoWebContext pippoWebContext) { return pippoWebContext.getRouteContext().getSession(); }  @Override String getOrCreateSessionId(PippoWebContext pippoWebContext); @Override Object get(PippoWebContext pippoWebContext, String name); @Override void set(PippoWebContext pippoWebContext, String name, Object value); @Override boolean destroySession(PippoWebContext pippoWebContext); @Override Object getTrackableSession(PippoWebContext pippoWebContext); @Override SessionStore<PippoWebContext> buildFromTrackableSession(PippoWebContext pippoWebContext, Object trackableSession); boolean renewSession(PippoWebContext pippoWebContext);  }