public static AzureStoragePath parseAzureStoragePath(String path) {
        try {
            URI uri = new URI(path);
            String rawAuthority = uri.getRawAuthority();
            if (rawAuthority == null) {
                throw new URISyntaxException(path, "Illegal azure storage path");
            }
            String[] parts = uri.getRawAuthority().split("@");
            if (parts.length < 2) {
                throw new URISyntaxException(path, "Illegal azure storage path");
            }

            if (!path.contains(".blob.core.windows.net") && !path.contains(".dfs.core.windows.net")) {
                throw new URISyntaxException(path, "Illegal azure storage path");
            }

            String container = parts[0];
            if (container.isEmpty()) {
                throw new URISyntaxException(path, "Empty container name in azure storage path");
            }

            String[] leftParts = parts[1].split("\\.");
            String storageAccount = leftParts[0];
            if (storageAccount.isEmpty()) {
                throw new URISyntaxException(path, "Empty storage account in azure storage path");
            }
            return new AzureStoragePath(storageAccount, container);
        } catch (URISyntaxException exception) {
            LOG.debug(exception.getMessage());
        }
        // Return empty AzureStoragePath
        return new AzureStoragePath("", "");
    }
@Test
    public void testAzurePathParseWithWASB() {
        String uri = "wasb://bottle@smith.blob.core.windows.net/path/1/2";
        AzureStoragePath path = CredentialUtil.parseAzureStoragePath(uri);
        Assert.assertEquals(path.getContainer(), "bottle");
        Assert.assertEquals(path.getStorageAccount(), "smith");

        uri = "wasbs://bottle@smith.blob.core.windows.net/path/1/2";
        path = CredentialUtil.parseAzureStoragePath(uri);
        Assert.assertEquals("bottle", path.getContainer());
        Assert.assertEquals("smith", path.getStorageAccount());

        uri = "wasb://a@.blob.core.windows.net/path/1/2";
        path = CredentialUtil.parseAzureStoragePath(uri);
        Assert.assertEquals("", path.getContainer());
        Assert.assertEquals("", path.getStorageAccount());

        uri = "wasb://a@p/path/1/2";
        path = CredentialUtil.parseAzureStoragePath(uri);
        Assert.assertEquals("", path.getContainer());
        Assert.assertEquals("", path.getStorageAccount());
    }