@Override
    public String getApiUrl() {
        return endpoint.getApiUri();
    }
@Test
    public void testServerGithubEnterpriseTopLevelUrl() throws Exception {
        // Create a server
        Map resp = request()
            .status(400)
            .jwtToken(token)
            .crumb( crumb )
            .data(MapsHelper.of(
                "name", "My Server",
                "apiUrl", getApiUrl()
            ))
            .post("/organizations/jenkins/scm/github-enterprise/servers/")
            .build(Map.class);

        List errors = (List) resp.get("errors");
        Assert.assertEquals(1, errors.size());

        Map error1 = (Map) errors.get(0);
        Assert.assertEquals("apiUrl", error1.get("field"));
        Assert.assertEquals(GithubServerContainer.ERROR_MESSAGE_INVALID_APIURL, error1.get("message"));
        Assert.assertEquals("INVALID", error1.get("code"));
    }