### Question:
S3Client { ObjectMetadata getObjectMetadata(String bucket, String key) { return amazonS3.getObjectMetadata(bucket, key); } S3Client(AmazonS3 amazonS3, boolean dryRunEnabled);   }### Answer:
@Test void getObjectSize() { amazonS3.putObject(bucket, key2, content); ObjectMetadata result = s3Client.getObjectMetadata(bucket, key2); assertThat(result.getContentLength()).isNotEqualTo(0L); }
@Test void getObjectSizeWithSpaceInKey() { String spacedKey = key2 + "/ /file"; amazonS3.putObject(bucket, spacedKey, content); ObjectMetadata result = s3Client.getObjectMetadata(bucket, spacedKey); assertThat(result.getContentLength()).isNotEqualTo(0L); }
@Test void getObjectSizeForEmptyFile() { amazonS3.putObject(bucket, key2, ""); ObjectMetadata result = s3Client.getObjectMetadata(bucket, key2); assertThat(result.getContentLength()).isEqualTo(0L); }