EmptySessionProvider implements Supplier<RestxSession> { @Override public RestxSession get() { return new RestxSession(definition, ImmutableMap.<String, String>of(), Optional.<RestxPrincipal>absent(), Duration.ZERO); } EmptySessionProvider(Definition definition); @Override RestxSession get();  }
@Test public void should_provide_empty_session() throws Exception { RestxSession restxSession = Factory.getInstance().getComponent(EmptySessionProvider.class).get(); assertThat(restxSession).isNotNull(); assertThat(restxSession.getPrincipal().isPresent()).isFalse(); }