+ Answer<Sone> returnCurrentSone = new Answer<Sone>() {
+ @Override
+ public Sone answer(InvocationOnMock invocation) throws Throwable {
+ return currentSone.orNull();
+ }
+ };
+ when(webInterface.getCurrentSone(any(ToadletContext.class))).then(returnCurrentSone);
+ when(webInterface.getCurrentSone(any(Session.class))).then(returnCurrentSone);