@Test public void testBroadcastWithOutData() { DownloadEndBroadcast downloadEndBroadcast = new DownloadEndBroadcast(); try { downloadEndBroadcast.createIntent(); failBecauseExceptionWasNotThrown(IllegalStateException.class); } catch (IllegalStateException expectedException) { } }
public static Intent createIntent(String torrentFile, int downloadState) { return new DownloadEndBroadcast() .setTorrentFile(torrentFile) .setDownloadState(downloadState) .createIntent(); }
DownloadEndBroadcast { public static Intent createIntent(String torrentFile, int downloadState) { return new DownloadEndBroadcast() .setTorrentFile(torrentFile) .setDownloadState(downloadState) .createIntent(); } }
DownloadEndBroadcast { public static Intent createIntent(String torrentFile, int downloadState) { return new DownloadEndBroadcast() .setTorrentFile(torrentFile) .setDownloadState(downloadState) .createIntent(); } DownloadEndBroadcast(); }
DownloadEndBroadcast { public static Intent createIntent(String torrentFile, int downloadState) { return new DownloadEndBroadcast() .setTorrentFile(torrentFile) .setDownloadState(downloadState) .createIntent(); } DownloadEndBroadcast(); static Intent createIntent(String torrentFile, int downloadState); DownloadEndBroadcast setTorrentFile(String torrentFile); DownloadEndBroadcast setDownloadState(int downloadState); Intent createIntent(); }
DownloadEndBroadcast { public static Intent createIntent(String torrentFile, int downloadState) { return new DownloadEndBroadcast() .setTorrentFile(torrentFile) .setDownloadState(downloadState) .createIntent(); } DownloadEndBroadcast(); static Intent createIntent(String torrentFile, int downloadState); DownloadEndBroadcast setTorrentFile(String torrentFile); DownloadEndBroadcast setDownloadState(int downloadState); Intent createIntent();  }