BitTorrentDownloadManager { public void abort() { context.startService(AbortRequest.createIntent(context)); } BitTorrentDownloadManager(Context context); void registerDownloadListener(DownloadListener listener); void unregisterDownloadListener(DownloadListener listener); void enqueue(DownloadRequest downloadRequest); void abort();  }
@Test public void testAbort() { BitTorrentDownloadManager manager = new BitTorrentDownloadManager(RuntimeEnvironment.application); manager.abort(); Intent nextStartedIntent = ShadowApplication.getInstance().peekNextStartedService(); Intent referenceAbortIntent = AbortRequest.createIntent(RuntimeEnvironment.application); assertThat(nextStartedIntent.filterEquals(referenceAbortIntent)).isTrue(); }