S3BinaryStore extends AbstractBinaryStore { @Override public InputStream getInputStream(BinaryKey key) throws BinaryStoreException { try { S3Object s3Object = s3Client.getObject(bucketName, key.toString()); return s3Object.getObjectContent(); } catch (AmazonClientException e) { throw new BinaryStoreException(e); } } S3BinaryStore(String accessKey, String secretKey, String bucketName);  S3BinaryStore(String accessKey, String secretKey, String bucketName, String endPoint);  S3BinaryStore( String accessKey,
                          String secretKey,
                          String bucketName,
                          String endPoint,
                          Boolean deleteUnusedNatively ); protected  S3BinaryStore(String bucketName, AmazonS3 s3Client, boolean deleteUnusedNatively); @Override void storeExtractedText(BinaryValue binaryValue, String extractedText); @Override String getExtractedText(BinaryValue binaryValue); @Override BinaryValue storeValue(InputStream stream, boolean markAsUnused); @Override InputStream getInputStream(BinaryKey key); @Override void markAsUsed(Iterable<BinaryKey> keys); @Override void markAsUnused(Iterable<BinaryKey> keys); @Override void removeValuesUnusedLongerThan(long minimumAge, TimeUnit timeUnit); @Override Iterable<BinaryKey> getAllBinaryKeys(); void migrateUnusedMetadataToTags();  }
@Test public void testGetInputStream() throws BinaryStoreException, IOException { S3Object s3Object = new S3Object(); s3Object.setObjectContent(new StringInputStream(TEST_CONTENT)); expect(s3Client.getObject(BUCKET, TEST_KEY)).andReturn(s3Object); replayAll(); InputStream resultStream = s3BinaryStore.getInputStream(new BinaryKey(TEST_KEY)); assertEquals(TEST_CONTENT, IOUtils.toString(resultStream)); }