@Test void testHttpSession() { final Instant time = now(); final Session session = new HttpSession(); assertEquals(Trellis.AnonymousAgent, session.getAgent(), "Incorrect agent in default session!"); assertFalse(session.getDelegatedBy().isPresent(), "Unexpected delegatedBy property!"); assertTrue(session.getIdentifier().getIRIString().startsWith(TRELLIS_SESSION_PREFIX), "ID has wrong prefix!"); final Session session2 = new HttpSession(); assertNotEquals(session.getIdentifier(), session2.getIdentifier(), "Session identifiers aren't unique!"); assertFalse(session.getCreated().isBefore(time), "Session date precedes its creation!"); assertFalse(session.getCreated().isAfter(session2.getCreated()), "Session date is out of order!"); }
public HttpSession(final IRI agent, final IRI delegatedBy) { this.agent = agent; this.delegatedBy = delegatedBy; this.created = now(); }
HttpSession implements Session { public HttpSession(final IRI agent, final IRI delegatedBy) { this.agent = agent; this.delegatedBy = delegatedBy; this.created = now(); } }
HttpSession implements Session { public HttpSession(final IRI agent, final IRI delegatedBy) { this.agent = agent; this.delegatedBy = delegatedBy; this.created = now(); } HttpSession(final IRI agent, final IRI delegatedBy);  HttpSession(final IRI agent);  HttpSession(); }
HttpSession implements Session { public HttpSession(final IRI agent, final IRI delegatedBy) { this.agent = agent; this.delegatedBy = delegatedBy; this.created = now(); } HttpSession(final IRI agent, final IRI delegatedBy);  HttpSession(final IRI agent);  HttpSession(); @Override IRI getIdentifier(); @Override IRI getAgent(); @Override Optional<IRI> getDelegatedBy(); @Override Instant getCreated(); static Session from(final SecurityContext security); }
HttpSession implements Session { public HttpSession(final IRI agent, final IRI delegatedBy) { this.agent = agent; this.delegatedBy = delegatedBy; this.created = now(); } HttpSession(final IRI agent, final IRI delegatedBy);  HttpSession(final IRI agent);  HttpSession(); @Override IRI getIdentifier(); @Override IRI getAgent(); @Override Optional<IRI> getDelegatedBy(); @Override Instant getCreated(); static Session from(final SecurityContext security);  }