PrepareParams { public Optional<ApplicationRoles> applicationRoles() { return applicationRoles; } 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 testCorrectParsingWithApplicationRoles() { String req = request + "&" + PrepareParams.APPLICATION_HOST_ROLE + "=hostRole&" + PrepareParams.APPLICATION_CONTAINER_ROLE + "=containerRole"; var prepareParams = createParams(req, TenantName.from("foo")); Optional<ApplicationRoles> applicationRoles = prepareParams.applicationRoles(); assertTrue(applicationRoles.isPresent()); assertEquals("hostRole", applicationRoles.get().applicationHostRole()); assertEquals("containerRole", applicationRoles.get().applicationContainerRole()); }