@Override
    public Map<String, String> getMetadata(final Path file) throws BackgroundException {
        return new S3AttributesFinderFeature(session, acl).find(file).getMetadata();
    }
@Test
    public void testGetMetadataFile() throws Exception {
        final Path container = new Path("versioning-test-eu-central-1-cyberduck", EnumSet.of(Path.Type.volume, Path.Type.directory));
        final Path test = new Path(container, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
        new S3TouchFeature(session, new S3AccessControlListFeature(session)).touch(test, new TransferStatus()
                .withMetadata(Collections.singletonMap("app", "cyberduck"))
                .withMime("text/plain"));
        final Map<String, String> metadata = new S3MetadataFeature(session, new S3AccessControlListFeature(session)).getMetadata(test);
        assertFalse(metadata.isEmpty());
        assertTrue(metadata.containsKey("app"));
        assertEquals("cyberduck", metadata.get("app"));
        assertTrue(metadata.containsKey("Content-Type"));
        assertEquals("text/plain", metadata.get("Content-Type"));
        assertFalse(metadata.containsKey(Constants.KEY_FOR_USER_METADATA));
        assertFalse(metadata.containsKey(Constants.KEY_FOR_SERVICE_METADATA));
        assertFalse(metadata.containsKey(Constants.KEY_FOR_COMPLETE_METADATA));
        new S3DefaultDeleteFeature(session).delete(Collections.singletonList(test), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }