DeployState implements ConfigDefinitionStore { public Optional<ApplicationPackage> getPermanentApplicationPackage() { return permanentApplicationPackage; } private  DeployState(ApplicationPackage applicationPackage,
                        SearchDocumentModel searchDocumentModel,
                        RankProfileRegistry rankProfileRegistry,
                        FileRegistry fileRegistry,
                        DeployLogger deployLogger,
                        Optional<HostProvisioner> hostProvisioner,
                        Provisioned provisioned,
                        ModelContext.Properties properties,
                        Version vespaVersion,
                        Optional<ApplicationPackage> permanentApplicationPackage,
                        Optional<ConfigDefinitionRepo> configDefinitionRepo,
                        Optional<Model> previousModel,
                        Set<ContainerEndpoint> endpoints,
                        Collection<MlModelImporter> modelImporters,
                        Zone zone,
                        QueryProfiles queryProfiles,
                        SemanticRules semanticRules,
                        Instant now,
                        Version wantedNodeVespaVersion,
                        boolean accessLoggingEnabledByDefault,
                        Optional<DockerImage> wantedDockerImageRepo); static DeployState createTestState(); static DeployState createTestState(DeployLogger testLogger); static DeployState createTestState(ApplicationPackage applicationPackage); static HostProvisioner getDefaultModelHostProvisioner(ApplicationPackage applicationPackage); Provisioned provisioned(); final RankProfileRegistry rankProfileRegistry(); ValidationOverrides validationOverrides(); @Override final Optional<ConfigDefinition> getConfigDefinition(ConfigDefinitionKey defKey); ApplicationPackage getApplicationPackage(); List<NamedSchema> getSchemas(); DocumentModel getDocumentModel(); DeployLogger getDeployLogger(); boolean getAccessLoggingEnabledByDefault(); FileRegistry getFileRegistry(); HostProvisioner getProvisioner(); Optional<ApplicationPackage> getPermanentApplicationPackage(); ModelContext.Properties getProperties(); Version getVespaVersion(); Optional<Model> getPreviousModel(); boolean isHosted(); Set<ContainerEndpoint> getEndpoints(); Zone zone(); QueryProfiles getQueryProfiles(); SemanticRules getSemanticRules(); ImportedMlModels getImportedModels(); Version getWantedNodeVespaVersion(); Optional<DockerImage> getWantedDockerImageRepo(); Instant now(); Optional<EndpointCertificateSecrets> endpointCertificateSecrets(); Optional<String> tlsClientAuthority();  }
@Test public void testBuilder() { DeployState.Builder builder = new DeployState.Builder(); ApplicationPackage app = MockApplicationPackage.createEmpty(); builder.permanentApplicationPackage(Optional.of(app)); DeployState state = builder.build(); assertThat(state.getPermanentApplicationPackage().get(), is(app)); }