2.7.0版本getContextPath方法：
```
protected String getContextPath(URL url) {
        String contextPath = url.getPath();
        return contextPath.endsWith("/") ? contextPath.substring(0,contextPath.length()-1) : contextPath;
    }
```
无法将方法置入web容器中，退回2.6.5版本的方法：
```
protected String getContextPath(URL url) {
        int pos = url.getPath().lastIndexOf("/");
        return pos > 0 ? url.getPath().substring(0, pos) : "";
    }
```
使用正常，两个方法应该不等价的。
ConfigManager.getInstance().clear();
    }
    @Test
    public void testExport() throws Exception {
        service.export();
        assertThat(service.getExportedUrls(), hasSize(1));
        URL url = service.toUrl();
        assertThat(url.getProtocol(), equalTo("mockprotocol2"));
        assertThat(url.getPath(), equalTo(DemoService.class.getName()));
        assertThat(url.getParameters(), hasEntry(Constants.ANYHOST_KEY, "true"));
        assertThat(url.getParameters(), hasEntry(Constants.APPLICATION_KEY, "app"));
        assertThat(url.getParameters(), hasKey(Constants.BIND_IP_KEY));
        assertThat(url.getParameters(), hasKey(Constants.BIND_PORT_KEY));
        assertThat(url.getParameters(), hasEntry(Constants.DEFAULT_KEY + "." + Constants.EXPORT_KEY, "true"));
        assertThat(url.getParameters(), hasEntry("echo.0.callback", "false"));
        assertThat(url.getParameters(), hasEntry(Constants.GENERIC_KEY, "false"));
        assertThat(url.getParameters(), hasEntry(Constants.INTERFACE_KEY, DemoService.class.getName()));
        assertThat(url.getParameters(), hasKey(Constants.METHODS_KEY));
        assertThat(url.getParameters().get(Constants.METHODS_KEY), containsString("echo"));
        assertThat(url.getParameters(), hasEntry(Constants.SIDE_KEY, Constants.PROVIDER));
        Mockito.verify(protocolDelegate).export(Mockito.any(Invoker.class));
    }
    @Test
    public void testProxy() throws Exception {
        service2.export();
        assertThat(service2.getExportedUrls(), hasSize(1));
        assertEquals(2, TestProxyFactory.count); 
    }
    @Test
    public void testDelayExport() throws Exception {