ServiceSentenceFetchExecutor implements SentenceFetchExecutor { @Override public void fetchTodaysSentence(boolean manual) { LogUtils.v(Constants.TAG, ServiceSentenceFetchExecutor.class.getCanonicalName() + " fetchTodaysSentence"); mContext.startService(new Intent(mContext, DEFetchService.class)); } @VisibleForTesting  ServiceSentenceFetchExecutor(Context context); static synchronized ServiceSentenceFetchExecutor getInstance(Context context); @Override void fetchTodaysSentence(boolean manual);  }
@Test public void testFetchTodaysSentence() { mServiceSentenceFetchExecutor.fetchTodaysSentence(false); verify(mContext).startService(mIntentCaptor.capture()); Intent intent = mIntentCaptor.getValue(); assertTrue(intent != null); }