private void doStart() { mockTask.listenToPhoneState( capture(phoneListenerCapture), eq(PhoneStateListener.LISTEN_CALL_STATE)); expect(mockTask.newTextToSpeech(same(getContext()), capture(initListenerCapture))) .andStubReturn(ttsDelegate); AndroidMock.replay(mockTask); task.start(); }