### Question:
S3Repository extends AbstractRepository { @Override public String getName() { return name; } S3Repository(
            S3Client client,
            String name,
            String bucket,
            String prefix,
            String artifactId,
            String modelName); @Override boolean isRemote(); @Override String getName(); @Override URI getBaseUri(); @Override Metadata locate(MRL mrl); @Override Artifact resolve(MRL mrl, String version, Map<String, String> filter); @Override List<MRL> getResources();  }### Answer:
@Test public void testLoadModelFromS3() throws MalformedModelException, ModelNotFoundException, IOException { S3Client client = S3Client.builder() .credentialsProvider(AnonymousCredentialsProvider.create()) .region(Region.US_EAST_1) .build(); Repository.registerRepositoryFactory(new S3RepositoryFactory(client)); Criteria<NDList, NDList> criteria = Criteria.builder() .setTypes(NDList.class, NDList.class) .optModelUrls( "s3: .optModelName("mlp") .optTranslator(new NoopTranslator()) .build(); try (ZooModel<NDList, NDList> model = ModelZoo.loadModel(criteria)) { Assert.assertEquals(model.getName(), "mlp"); } }
@Test public void testLoadArchiveFromS3() throws MalformedModelException, ModelNotFoundException, IOException { S3Client client = S3Client.builder() .credentialsProvider(AnonymousCredentialsProvider.create()) .region(Region.US_EAST_1) .build(); Repository.registerRepositoryFactory(new S3RepositoryFactory(client)); Criteria<NDList, NDList> criteria = Criteria.builder() .setTypes(NDList.class, NDList.class) .optModelUrls("s3: .optModelName("mlp") .optTranslator(new NoopTranslator()) .build(); try (ZooModel<NDList, NDList> model = ModelZoo.loadModel(criteria)) { Assert.assertEquals(model.getName(), "mlp"); } }