public String expand(final String remote) {
        return this.expand(remote, PREFIX);
    }
@Test
    public void testExpandPathWithDirectory() {
        final String expanded = new TildePathExpander(new Path("/home/jenkins", EnumSet.of(Path.Type.directory)))
                .expand("/~/f/s");
        assertEquals("/home/jenkins/f/s", expanded);
    }