@Test public void givenNoRemoteResourceWasPreviouslyDownloaded_whenGetDownloadedFileExtension_thenReturnsAnOptionalAbsent() { final Optional<String> optionalDownloadedFileExtension = testFileDownloader.getDownloadedFileExtension(); assertThat(optionalDownloadedFileExtension, equalTo(Optional.<String>absent())); }
Optional<String> getDownloadedFileExtension() { if (retrievedFileMimeType.isPresent() && SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.containsKey(retrievedFileMimeType.get())) { return Optional.of( SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.get(retrievedFileMimeType.get())); } return Optional.absent(); }
FileDownloader { Optional<String> getDownloadedFileExtension() { if (retrievedFileMimeType.isPresent() && SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.containsKey(retrievedFileMimeType.get())) { return Optional.of( SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.get(retrievedFileMimeType.get())); } return Optional.absent(); } }
FileDownloader { Optional<String> getDownloadedFileExtension() { if (retrievedFileMimeType.isPresent() && SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.containsKey(retrievedFileMimeType.get())) { return Optional.of( SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.get(retrievedFileMimeType.get())); } return Optional.absent(); } FileDownloader(@NonNull Context parentContext); }
FileDownloader { Optional<String> getDownloadedFileExtension() { if (retrievedFileMimeType.isPresent() && SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.containsKey(retrievedFileMimeType.get())) { return Optional.of( SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.get(retrievedFileMimeType.get())); } return Optional.absent(); } FileDownloader(@NonNull Context parentContext);  }
FileDownloader { Optional<String> getDownloadedFileExtension() { if (retrievedFileMimeType.isPresent() && SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.containsKey(retrievedFileMimeType.get())) { return Optional.of( SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP.get(retrievedFileMimeType.get())); } return Optional.absent(); } FileDownloader(@NonNull Context parentContext);  static final ImmutableMap<String, String> SUPPORTED_MIME_TYPE_TO_FILE_EXTENSION_MAP; }