@Override
    public void validate(String name, String value) throws ParameterException {
        URL serverUrl;
        try {
            serverUrl = new URL(value);
        } catch (MalformedURLException e) {
            throw new ParameterException(name + " is not a valid url");
        }

        if (!List.of("http", "https").contains(serverUrl.getProtocol())) {
            throw new ParameterException(name + " must use http or https protocol");
        }

        if (!serverUrl.toString().endsWith("/go") && !serverUrl.toString().endsWith("/go/")) {
            throw new ParameterException(name + " must end with '/go' (http://localhost:8153/go)");
        }
    }
@Test
    void shouldNotAllowUrlEndingWithoutGo() {
        assertThatCode(() -> new ServerUrlValidator().validate("foo", "https://example.com"))
                .isOfAnyClassIn(ParameterException.class)
                .hasMessageContaining("must end with '/go' (http://localhost:8153/go)");
    }