@Test
public void persistOfflineMapTaskShouldReturnFalseWhenGivenInvalidDownloadTask() {

    Intent sampleServiceIntent = createMapboxOfflineDownloaderServiceIntent();
    sampleServiceIntent = createSampleDownloadIntent(sampleServiceIntent);
    Intent sampleInvalidIntent = (Intent) sampleServiceIntent.clone();
    sampleInvalidIntent.removeExtra(Constants.PARCELABLE_KEY_STYLE_URL);
    assertEquals(false, mapboxOfflineDownloaderService.persistOfflineMapTask(sampleInvalidIntent));
    sampleInvalidIntent = (Intent) sampleInvalidIntent.clone();
    sampleInvalidIntent.removeExtra(Constants.PARCELABLE_KEY_MIN_ZOOM);
    assertEquals(false, mapboxOfflineDownloaderService.persistOfflineMapTask(sampleInvalidIntent));
    sampleInvalidIntent = (Intent) sampleInvalidIntent.clone();
    sampleInvalidIntent.removeExtra(Constants.PARCELABLE_KEY_MAX_ZOOM);
    assertEquals(false, mapboxOfflineDownloaderService.persistOfflineMapTask(sampleInvalidIntent));
    sampleInvalidIntent = (Intent) sampleInvalidIntent.clone();
    sampleInvalidIntent.removeExtra(Constants.PARCELABLE_KEY_TOP_LEFT_BOUND);
    assertEquals(false, mapboxOfflineDownloaderService.persistOfflineMapTask(sampleInvalidIntent));
    sampleInvalidIntent = (Intent) sampleInvalidIntent.clone();
    sampleInvalidIntent.removeExtra(Constants.PARCELABLE_KEY_BOTTOM_RIGHT_BOUND);
    assertEquals(false, mapboxOfflineDownloaderService.persistOfflineMapTask(sampleInvalidIntent));
}