@Test void consumeFileContentTest() throws Exception { fileService.consumeFileContent(SPACE_1, "1111-2222-3333-4444", Mockito.mock(FileContentConsumer.class)); Mockito.verify(fileStorage) .processFileContent(Mockito.eq(SPACE_1), Mockito.eq("1111-2222-3333-4444"), Mockito.any()); }
public void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer) throws FileStorageException { processFileContent(space, id, inputStream -> { fileContentConsumer.consume(inputStream); return null; }); }
FileService { public void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer) throws FileStorageException { processFileContent(space, id, inputStream -> { fileContentConsumer.consume(inputStream); return null; }); } }
FileService { public void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer) throws FileStorageException { processFileContent(space, id, inputStream -> { fileContentConsumer.consume(inputStream); return null; }); } FileService(DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage);  FileService(String tableName, DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage); protected  FileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider, FileStorage fileStorage); }
FileService { public void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer) throws FileStorageException { processFileContent(space, id, inputStream -> { fileContentConsumer.consume(inputStream); return null; }); } FileService(DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage);  FileService(String tableName, DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage); protected  FileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider, FileStorage fileStorage); FileEntry addFile(String space, String namespace, String name, InputStream inputStream); FileEntry addFile(String space, String namespace, String name, File existingFile); List<FileEntry> listFiles(String space, String namespace); FileEntry getFile(String space, String id); void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer); T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor); int deleteBySpaceAndNamespace(String space, String namespace); int deleteBySpace(String space); int deleteModifiedBefore(Date modificationTime); boolean deleteFile(String space, String id); int deleteFilesEntriesWithoutContent(); }
FileService { public void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer) throws FileStorageException { processFileContent(space, id, inputStream -> { fileContentConsumer.consume(inputStream); return null; }); } FileService(DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage);  FileService(String tableName, DataSourceWithDialect dataSourceWithDialect, FileStorage fileStorage); protected  FileService(DataSourceWithDialect dataSourceWithDialect, SqlFileQueryProvider sqlFileQueryProvider, FileStorage fileStorage); FileEntry addFile(String space, String namespace, String name, InputStream inputStream); FileEntry addFile(String space, String namespace, String name, File existingFile); List<FileEntry> listFiles(String space, String namespace); FileEntry getFile(String space, String id); void consumeFileContent(String space, String id, FileContentConsumer fileContentConsumer); T processFileContent(String space, String id, FileContentProcessor<T> fileContentProcessor); int deleteBySpaceAndNamespace(String space, String namespace); int deleteBySpace(String space); int deleteModifiedBefore(Date modificationTime); boolean deleteFile(String space, String id); int deleteFilesEntriesWithoutContent();  }