### Question:
BaseApiClient { public static boolean isProcessingServiceInstalled(Context context) { PackageManager packageManager = context.getPackageManager(); List<ResolveInfo> resolveInfo = packageManager .queryIntentServices(getIntent(FLOW_PROCESSING_SERVICE_COMPONENT), PackageManager.MATCH_DEFAULT_ONLY); return resolveInfo.size() == 1 && resolveInfo.get(0).serviceInfo != null; } protected  BaseApiClient(String apiVersion, Context context); @NonNull Completable initiateRequest(final Request request); Completable sendEvent(final FlowEvent flowEvent); @NonNull Observable<Response> queryResponses(@NonNull ResponseQuery responseQuery); @NonNull Single<List<Device>> getDevices(); @NonNull Observable<FlowEvent> subscribeToSystemEvents(); static boolean isProcessingServiceInstalled(Context context); @NonNull static String getProcessingServiceVersion(Context context); static final String FLOW_PROCESSING_SERVICE; }### Answer:
@Test public void callIsProcessingServiceInstalledShouldReturnFalse() throws Exception { assertThat(BaseApiClient.isProcessingServiceInstalled(RuntimeEnvironment.application)).isFalse(); }
@Test public void callIsProcessingServiceInstalledShouldReturnTrueIfPackageManagerThinksSo() throws Exception { pretendServiceIsInstalled(BaseApiClient.FLOW_PROCESSING_SERVICE_COMPONENT); assertThat(BaseApiClient.isProcessingServiceInstalled(RuntimeEnvironment.application)).isTrue(); }