### Question:
StatelessSSOToken implements SSOToken { @Override public long getIdleTime() throws SSOException { try { return session.getIdleTime(); } catch (SessionException e) { throw new SSOException(e); } } StatelessSSOToken(StatelessSession session); boolean isValid(boolean reset); @Override Principal getPrincipal(); @Override String getAuthType(); @Override int getAuthLevel(); @Override InetAddress getIPAddress(); @Override String getHostName(); @Override long getTimeLeft(); @Override long getMaxSessionTime(); @Override long getIdleTime(); @Override long getMaxIdleTime(); @Override SSOTokenID getTokenID(); @Override void setProperty(String name, String value); @Override String getProperty(String name); @Override String getProperty(String name, boolean ignoreState); @Override void addSSOTokenListener(SSOTokenListener listener); @Override String encodeURL(String url); @Override boolean isTokenRestricted(); @Override String dereferenceRestrictedTokenID(SSOToken requester, String restrictedId); @Override String toString();  }### Answer:
@Test public void shouldGetIdleTimeFromSession() throws Exception { long timeIdle = 1234l; given(mockSession.getIdleTime()).willReturn(timeIdle); long result = statelessSSOToken.getIdleTime(); assertThat(result).isEqualTo(timeIdle); }
@Test(expectedExceptions = SSOException.class) public void shouldPropagateExceptionsWhenReadingTimeIdle() throws Exception { given(mockSession.getIdleTime()).willThrow(new SessionException("test")); statelessSSOToken.getIdleTime(); }