GooglePlayDriver implements Driver { @Override public int cancelAll() { context.sendBroadcast(createBatchCancelRequest()); return FirebaseJobDispatcher.CANCEL_RESULT_SUCCESS; } GooglePlayDriver(@NonNull Context context); @Override boolean isAvailable(); @Override @ScheduleResult int schedule(@NonNull Job job); @Override int cancel(@NonNull String tag); @Override int cancelAll(); @NonNull @Override JobValidator getValidator();  }
@Test public void testCancelJobs_backendUnavailable() throws Exception { markBackendUnavailable(); assertEquals( "Expected cancelAll() request to fail when backend is unavailable", FirebaseJobDispatcher.CANCEL_RESULT_NO_DRIVER_AVAILABLE, dispatcher.cancelAll()); }