static ApplicationId getFromApplicationId(HttpRequest request) {
        String from = request.getProperty("from");
        if (from == null || "".equals(from))
            throw new BadRequestException("Parameter 'from' has illegal value '" + from + "'");

        return getAndValidateFromParameter(URI.create(from));
    }
@Test
    public void require_that_application_urls_can_be_given_as_from_parameter() throws Exception {
        ApplicationId applicationId = ApplicationId.from(tenant.value(), "foo", "quux");
        HttpRequest request = post(Map.of(
                "from",
                "http://myhost:40555/application/v2/tenant/" + tenant + "/application/foo/environment/test/region/baz/instance/quux"));
        assertEquals(applicationId, SessionCreateHandler.getFromApplicationId(request));
    }