@Override
    public Path find() throws BackgroundException {
        return this.find(Context.files);
    }
@Test
    public void testFindWithDefaultPath() throws Exception {
        final Host bookmark = new Host(new NextcloudProtocol(), new Credentials("u"));
        final NextcloudHomeFeature feature = new NextcloudHomeFeature(bookmark);
        for(String s : variants("remote.php/webdav")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/remote.php/dav/files/u", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
        }
        for(String s : variants("remote.php/webdav/d")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/remote.php/dav/files/u/d", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
            assertEquals(new Path("/remote.php/dav/meta", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.meta));
            assertEquals(new Path("/remote.php/dav/versions/u", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.versions));
        }
        for(String s : variants("remote.php/dav/files/u")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/remote.php/dav/files/u/", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
            assertEquals(new Path("/remote.php/dav/meta", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.meta));
            assertEquals(new Path("/remote.php/dav/versions/u", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.versions));
        }
        for(String s : variants("remote.php/dav/files/u/d")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/remote.php/dav/files/u/d", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
            assertEquals(new Path("/remote.php/dav/meta", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.meta));
            assertEquals(new Path("/remote.php/dav/versions/u", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.versions));
        }
        for(String s : variants("d")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/remote.php/dav/files/u/d", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
        }
        for(String s : variants("w/remote.php/webdav")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/w/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/w/remote.php/dav/files/u", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
        }
        for(String s : variants("w/remote.php/webdav/d")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/w/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/w/remote.php/dav/files/u/d", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
        }
        for(String s : variants("w/remote.php/dav/files/u/d")) {
            bookmark.setDefaultPath(s);
            assertEquals(new Path("/w/ocs/v1.php", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.ocs));
            assertEquals(new Path("/w/remote.php/dav/files/u/d", EnumSet.of(Path.Type.directory)), feature.find(NextcloudHomeFeature.Context.files));
        }
    }