public Path getSegmentsDirectory(final Path file) {
        return new Path(file.getParent(), String.format("%s%s", prefix, file.getName()), EnumSet.of(Path.Type.directory));
    }
@Test
    public void testGetSegmentsDirectory() {
        final SwiftSegmentService service = new SwiftSegmentService(session, ".prefix/");
        final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final String name = UUID.randomUUID().toString();
        final String key = UUID.randomUUID().toString() + "/" + name;
        assertEquals("/test.cyberduck.ch/.prefix/" + key, service.getSegmentsDirectory(new Path(container, key, EnumSet.of(Path.Type.file))).getAbsolute());
        final Path directory = new Path(container, "dir", EnumSet.of(Path.Type.directory));
        assertEquals("/test.cyberduck.ch/dir/.prefix/" + key, service.getSegmentsDirectory(new Path(directory, key, EnumSet.of(Path.Type.file))).getAbsolute());
    }