@Override
    public InputStream fetch(String fetchKey, Metadata metadata, ParseContext parseContext) throws TikaException, IOException {

        LOGGER.debug("about to fetch fetchkey={} from endpoint ({})", fetchKey, endpoint);

        try {
            BlobClient blobClient = blobClientFactory.getClient(fetchKey);

            if (extractUserMetadata) {
                BlobProperties properties = blobClient.getProperties();
                if (properties.getMetadata() != null) {
                    for (Map.Entry<String, String> e : properties
                            .getMetadata()
                            .entrySet()) {
                        metadata.add(PREFIX + ":" + e.getKey(), e.getValue());
                    }
                }
            }
            if (!spoolToTemp) {
                return TikaInputStream.get(blobClient.openInputStream());
            } else {
                long start = System.currentTimeMillis();
                TemporaryResources tmpResources = new TemporaryResources();
                Path tmp = tmpResources.createTempFile();
                blobClient.downloadToFile(tmp.toRealPath().toString());
                TikaInputStream tis = TikaInputStream.get(tmp, metadata, tmpResources);
                long elapsed = System.currentTimeMillis() - start;
                LOGGER.debug("took {} ms to copy to local tmp file", elapsed);
                return tis;
            }
        } catch (Exception e) {
            throw new IOException("az-blob storage exception", e);
        }
    }
@Test
    public void testConfig() throws Exception {
        FetcherManager fetcherManager = FetcherManager.load(Paths.get(this
                .getClass()
                .getResource("/tika-config-az-blob.xml")
                .toURI()));
        Fetcher fetcher = fetcherManager.getFetcher("az-blob");
        List<Metadata> metadataList = null;
        try (Reader reader = new BufferedReader(new InputStreamReader(fetcher.fetch(FETCH_STRING, new Metadata(), new ParseContext()), StandardCharsets.UTF_8))) {
            metadataList = JsonMetadataList.fromJson(reader);
        }
        debug(metadataList);
    }