S3ArtifactStore { public void put(String from, String to) { put(new PutObjectRequest(bucket, to, new File(from))); } S3ArtifactStore(AmazonS3 client, String bucket);  S3ArtifactStore(GoEnvironment env, String bucket);  S3ArtifactStore(String bucket); void setStorageClass(String storageClass); void put(String from, String to); void put(String from, String to, ObjectMetadata metadata); void put(PutObjectRequest putObjectRequest); String pathString(String pathOnS3); void get(String from, String to); ObjectMetadata getMetadata(String key); void getPrefix(String prefix, String to); boolean bucketExists(); boolean exists(String bucket, String key); RevisionStatus getLatest(Artifact artifact); String getLatestPrefix(String pipeline, String stage, String job, String pipelineCounter); static AmazonS3 getS3client(GoEnvironment env);  }
@Test public void shouldUseStandardStorageClassAsDefault() { S3ArtifactStore store = new S3ArtifactStore(mockClient, "foo-bar"); store.put(new PutObjectRequest("foo-bar", "key", new File("/tmp/baz"))); verify(mockClient, times(1)).putObject(putCaptor.capture()); PutObjectRequest putRequest = putCaptor.getValue(); assertThat(putRequest.getStorageClass(), is("STANDARD")); }