public Path find(final Path selected) {
        if(null == selected) {
            return workdir;
        }
        if(selected.getType().contains(Path.Type.volume)) {
            return selected;
        }
        return selected.getParent();
    }
@Test
    public void testFindContainerSelected() {
        assertEquals(new Path("/container", EnumSet.of(Path.Type.directory, Path.Type.volume)),
                new UploadTargetFinder(new Path("/", EnumSet.of(Path.Type.directory)))
                        .find(new Path("/container", EnumSet.of(Path.Type.directory, Path.Type.volume))));
        assertEquals(new Path("/", EnumSet.of(Path.Type.directory, Path.Type.volume)),
                new UploadTargetFinder(new Path("/", EnumSet.of(Path.Type.directory, Path.Type.volume)))
                        .find(null));
    }