On Jun 12, 6:32 pm, "Dhanji R. Prasanna" <
dha...@gmail.com> wrote:
> You should bind @RequestScoped and @SessionScoped to your own mock Scope
> implementation. Then Guice will use this instead of its default HTTP scopes.
> In this case you want to omit the ServletModule in your test.
> MockRequestScope myMockScope = new MockRequestScope();
> bindScope(RequestScoped.class, myMockScope);
>
> //after tests
> myMockScope.assertThatThingsWereScoped();
>
> Btw, this is a very heavyweight way of testing, so I assume this is not
> something you need to do often.
> good luck!
>
> Dhanji.
>