### Question:
StreamFactory { public static IndirectDataset create(byte[] data) throws IOException { return DatasetBuilder.buffer() .configureDefaultCaches() .build(data); }  static IndirectDataset create(byte[] data); static IndirectDataset create(String filePath); static IndirectDataset create(String filePath, boolean isTempFile); static IndirectDataset create(String filepath, Date lastModified,
                                         boolean isTempFile);  }### Answer:
@Test public void testCreate32FromFilename () throws Exception { File temp = File.createTempFile("Test",".dat"); File source = new File(Filename.LITE_PATTERN_V32); Files.copy(source, temp); Dataset dataset = StreamFactory.create(temp.getPath()); ViableProvider.ensureViableProvider(new Provider(dataset)); dataset.close(); assertTrue(temp.exists()); dataset = StreamFactory.create(temp.getPath(), true); ViableProvider.ensureViableProvider(new Provider(dataset)); dataset.close(); assertFalse(temp.exists()); }
@Test public void testCreate31FromFilename () throws Exception { Dataset dataset = StreamFactory.create(Filename.LITE_PATTERN_V31); ViableProvider.ensureViableProvider(new Provider(dataset)); }
@Test public void testMemoryStreamDatasetConsistentDefault () throws IOException { IndirectDataset indirectDataset = StreamFactory.create(Filename.LITE_PATTERN_V32); Dataset memoryDataset = MemoryFactory.create(Filename.LITE_PATTERN_V32); compareDatasets(indirectDataset, memoryDataset); }
@Test public void testDefaultCache () throws Exception { Dataset dataset = StreamFactory.create(Filename.LITE_PATTERN_V32); Provider provider = new Provider(dataset, 20); cacheTests(provider); }