Forcing deep stubs on an injection

32 views
Skip to first unread message

Andrew McFague

unread,
Dec 8, 2014, 8:02:38 PM12/8/14
to juk...@googlegroups.com
I have an object that chains calls together:

session.getCluster().getMetadata().getKeyspace("...").getTables();

Normally, this could be done using the normal Mockito object like so:

@Mock(answer=RETURN_DEEP_STUBS)
Session session;

However, using the @Inject annotation, there's no ability to provide that.  Is there a way to set the "answers" for the Mock object?  Or is there another way to get the deep stubbing behavior?  Or is this the default?

Thanks!

Andrew
Reply all
Reply to author
Forward
0 new messages