DataRecordDownloadOptions { public static DataRecordDownloadOptions fromBlobDownloadOptions( @NotNull BlobDownloadOptions downloadOptions) { return new DataRecordDownloadOptions( downloadOptions.getMediaType(), downloadOptions.getCharacterEncoding(), downloadOptions.getFileName(), downloadOptions.getDispositionType(), downloadOptions.isDomainOverrideIgnored() ); } private  DataRecordDownloadOptions(final String mediaType,
                                      final String characterEncoding,
                                      final String fileName,
                                      final String dispositionType,
                                      boolean domainOverrideIgnored); static DataRecordDownloadOptions fromBlobDownloadOptions(
            @NotNull BlobDownloadOptions downloadOptions); @Nullable String getContentTypeHeader(); @Nullable String getContentDispositionHeader(); @Nullable String getMediaType(); @Nullable String getCharacterEncoding(); @Nullable String getFileName(); @Nullable String getDispositionType(); boolean isDomainOverrideIgnored(); static DataRecordDownloadOptions DEFAULT; }
@Test public void testConstruct() { BlobDownloadOptions blobDownloadOptions = new BlobDownloadOptions( MEDIA_TYPE_TEXT_PLAIN, CHARACTER_ENCODING_UTF_8, FILE_NAME_TEXT, DISPOSITION_TYPE_ATTACHMENT ); DataRecordDownloadOptions options = DataRecordDownloadOptions.fromBlobDownloadOptions(blobDownloadOptions); verifyDownloadOptions(options, MEDIA_TYPE_TEXT_PLAIN, CHARACTER_ENCODING_UTF_8, FILE_NAME_TEXT, DISPOSITION_TYPE_ATTACHMENT); }
@Test public void testDefault() { verifyDownloadOptions(DataRecordDownloadOptions.DEFAULT, null, null, null, DISPOSITION_TYPE_INLINE); verifyDownloadOptions(DataRecordDownloadOptions .fromBlobDownloadOptions(BlobDownloadOptions.DEFAULT), null, null, null, DISPOSITION_TYPE_INLINE); }
@Test public void testConstructFromNullThrowsException() { try { DataRecordDownloadOptions.fromBlobDownloadOptions(null); fail(); } catch (NullPointerException | IllegalArgumentException e) { } }