### Question:
S3ObjectsProvider { public String[] getBucketsNames() throws S3ServiceException { return Arrays.stream( getBuckets() ).map( b -> b.getName() ).toArray( String[]::new ); } S3ObjectsProvider( S3Service service ); String[] getBucketsNames(); S3Bucket getBucket( String bucketName ); String[] getS3ObjectsNames( String bucketName ); S3Object getS3Object( S3Bucket bucket, String objectKey, Long byteRangeStart, Long byteRangeEnd ); S3Object getS3Object( S3Bucket bucket, String objectKey ); long getS3ObjectContentLenght( S3Bucket bucket, String objectKey );  }### Answer:
@Test public void testGetBucketsNames() throws Exception { String[] actual = provider.getBucketsNames(); assertArrayEquals( EXPECTED_BUCKETS_NAMES, actual ); }