GrizzlySession extends Session { public boolean isValid() { return isValid; }  @Override String getIdInternal(); @Override void setIdInternal(final String id); boolean isValid(); void setValid(final boolean isValid); boolean isNew(); long getCreationTime(); void setCreationTime(final long creationTime); long getTimestamp(); void setTimestamp(final long timestamp); long access();  }
@Test public void isValid() { GrizzlySession s = new GrizzlySession(); assertTrue(s.getTimestamp() > -1); assertTrue(s.isValid()); s.setValid(false); assertEquals(-1, s.getTimestamp()); assertFalse(s.isValid()); s.setTimestamp(10000); s.setValid(true); assertTrue(s.isValid()); assertEquals(10000, s.getTimestamp()); }