S3SchemaUriResolver implements SchemaUriResolver { @VisibleForTesting URI newS3Uri(String key) { try { return new URI(String.format(uriFormat, bucket, key)); } catch (URISyntaxException e) { throw new MetaStoreException(String .format("Could not generate URI for schema: format='%s', bucket='%s', key='%s'", uriFormat, bucket, key), e); } } S3SchemaUriResolver(AmazonS3 s3Client, String bucket, String keyPrefix, boolean enableServerSideEncryption); @VisibleForTesting  S3SchemaUriResolver(
      TransferManager transferManager,
      String uriFormat,
      String bucket,
      String keyPrefix,
      boolean enableServerSideEncryption); @Override URI resolve(Schema schema, String road, int version);  }
@Test public void newS3Uri() throws URISyntaxException { URI uri = uriResolver.newS3Uri("x"); assertThat(uri, is(new URI("s3: }
@Test(expected = MetaStoreException.class) public void newS3UriException() throws URISyntaxException { uriResolver = new S3SchemaUriResolver(transferManager, "NOT_VALID_URI:{{}", BUCKET, null, false); uriResolver.newS3Uri("x"); }