PrepareParams { public Optional<Quota> quota() { return quota; } private  PrepareParams(ApplicationId applicationId, TimeoutBudget timeoutBudget, boolean ignoreValidationErrors,
                          boolean dryRun, boolean verbose, boolean isBootstrap, Optional<Version> vespaVersion,
                          List<ContainerEndpoint> containerEndpoints, Optional<String> tlsSecretsKeyName,
                          Optional<EndpointCertificateMetadata> endpointCertificateMetadata,
                          Optional<DockerImage> dockerImageRepository, Optional<AthenzDomain> athenzDomain,
                          Optional<ApplicationRoles> applicationRoles, Optional<Quota> quota, boolean force,
                          boolean internalRestart); static PrepareParams fromHttpRequest(HttpRequest request, TenantName tenant, Duration barrierTimeout); String getApplicationName(); ApplicationId getApplicationId(); Optional<Version> vespaVersion(); List<ContainerEndpoint> containerEndpoints(); boolean ignoreValidationErrors(); boolean isDryRun(); boolean isVerbose(); boolean isBootstrap(); boolean force(); boolean internalRestart(); TimeoutBudget getTimeoutBudget(); Optional<String> tlsSecretsKeyName(); Optional<EndpointCertificateMetadata> endpointCertificateMetadata(); Optional<DockerImage> dockerImageRepository(); Optional<AthenzDomain> athenzDomain(); Optional<ApplicationRoles> applicationRoles(); Optional<Quota> quota();  }
@Test public void testQuotaParsing() { var quotaParam = "{\"clusterSize\": 23, \"budget\": 23232323}"; var quotaEncoded = URLEncoder.encode(quotaParam, StandardCharsets.UTF_8); var prepareParams = createParams(request + "&" + PrepareParams.QUOTA_PARAM_NAME + "=" + quotaEncoded, TenantName.from("foo")); assertEquals(23, (int) prepareParams.quota().get().maxClusterSize().get()); assertEquals(23232323, (int) prepareParams.quota().get().budget().get()); }