static S3ResourceId fromComponents(String scheme, String bucket, String key) {
    if (!key.startsWith("/")) {
      key = "/" + key;
    }
    return new S3ResourceId(scheme, bucket, key, null, null);
  }
@Test
  public void testInvalidBucket() {
    thrown.expect(IllegalArgumentException.class);
    S3ResourceId.fromComponents("s3", "invalid/", "");
  }