public Path getSegment(final Path file, int segmentNumber) {
        return new Path(this.getSegmentsDirectory(file), String.format("%08d", segmentNumber), EnumSet.of(Path.Type.file));
    }
@Test
    public void testGetSegmentName() {
        final SwiftSegmentService service = new SwiftSegmentService(session, ".prefix/");
        final Path container = new Path("test.cyberduck.ch", EnumSet.of(Path.Type.directory, Path.Type.volume));
        final Path directory = new Path(container, "dir", EnumSet.of(Path.Type.directory));
        final String name = "name";
        final String key = "sub/" + name;
        assertEquals("/test.cyberduck.ch/dir/.prefix/sub/name/00000001", service.getSegment(new Path(directory, key, EnumSet.of(Path.Type.file)), 1).getAbsolute());
    }