private HttpResponse getTenant(RestApi.RequestContext context) {
        TenantName name = TenantName.from(context.pathParameters().getStringOrThrow("tenant"));
        if ( ! tenantRepository.checkThatTenantExists(name))
            throw new RestApiException.NotFound("Tenant '" + name + "' was not found.");

        return new TenantGetResponse(name);
    }
@Test
    public void testTenantCreate() throws Exception {
        assertNull(tenantRepository.getTenant(a));
        assertResponse(PUT, "/application/v2/tenant/a",
                       "{\"message\":\"Tenant a created.\"}");
        assertEquals(a, tenantRepository.getTenant(a).getName());
    }