class TenantHandler extends HttpHandler {

    @Override
    protected HttpResponse handlePUT(HttpRequest request) {
        TenantName tenantName = getAndValidateTenantFromRequest(request);
        try {
            tenantRepository.addTenant(tenantName);
        } catch (Exception e) {
            throw new InternalServerException(Exceptions.toMessageString(e));
        }
        return new TenantCreateResponse(tenantName);
    }

    @Inject public  TenantHandler(Context ctx, ApplicationRepository applicationRepository);

}