public String[] getS3ObjectsNames( String bucketName ) throws Exception {
    Bucket bucket = getBucket( bucketName );
    if ( bucket == null ) {
      throw new Exception( Messages.getString( "S3DefaultService.Exception.UnableToFindBucket.Message", bucketName ) );
    }
    return getS3Objects( bucket ).getObjectSummaries().stream().map( b -> b.getKey() ).toArray( String[]::new );
  }
@Test public void testGetObjectsNamesNoSuchBucket_ThrowsExeption() {
    try {
      provider.getS3ObjectsNames( UNKNOWN_BUCKET );
      fail( "The Exception: Unable to find bucket '" + UNKNOWN_BUCKET + "' should be thrown but it was not." );
    } catch ( Exception e ) {
      assertTrue( e.getLocalizedMessage().contains( "Unable to find bucket '" + UNKNOWN_BUCKET + "'" ) );
    }
  }