public static ADLSLocationParts parseLocation(String location) {
    URI locationUri = URI.create(location);

    String[] authorityParts = locationUri.getAuthority().split("@");
    if (authorityParts.length > 1) {
      return new ADLSLocationParts(
          locationUri.getScheme(),
          authorityParts[0],
          authorityParts[1],
          authorityParts[1].split("\\.")[0],
          locationUri.getPath());
    } else {
      return new ADLSLocationParts(
          locationUri.getScheme(),
          null,
          authorityParts[0],
          authorityParts[0].split("\\.")[0],
          locationUri.getPath());
    }
  }
@Test
  public void testContainerInAuthority() {
    String location =
        format(
            "abfs://%s@%s.dfs.core.windows.net/path/to/files",
            TEST_CONTAINER, TEST_STORAGE_ACCOUNT);

    ADLSLocationUtils.ADLSLocationParts parts = ADLSLocationUtils.parseLocation(location);

    assertThat(parts.container()).isEqualTo(TEST_CONTAINER);
    assertThat(parts.accountName()).isEqualTo(TEST_STORAGE_ACCOUNT);
    assertThat(parts.account()).isEqualTo(format("%s.dfs.core.windows.net", TEST_STORAGE_ACCOUNT));
    assertThat(parts.scheme()).isEqualTo("abfs");
  }