Controller extends AbstractComponent { public ConfigServerMetrics metrics() { return metrics; } @Inject  Controller(CuratorDb curator, RotationsConfig rotationsConfig, AccessControl accessControl, FlagSource flagSource,
                      MavenRepository mavenRepository, ServiceRegistry serviceRegistry, Metric metric, SecretStore secretStore,
                      ControllerConfig controllerConfig);  Controller(CuratorDb curator, RotationsConfig rotationsConfig, AccessControl accessControl,
                      Supplier<String> hostnameSupplier, FlagSource flagSource, MavenRepository mavenRepository,
                      ServiceRegistry serviceRegistry, Metric metric, SecretStore secretStore, ControllerConfig controllerConfig); TenantController tenants(); ApplicationController applications(); JobController jobController(); RoutingController routing(); ServiceRegistry serviceRegistry(); FlagSource flagSource(); Clock clock(); ZoneRegistry zoneRegistry(); NameServiceForwarder nameServiceForwarder(); MavenRepository mavenRepository(); ControllerConfig controllerConfig(); ApplicationView getApplicationView(String tenantName, String applicationName, String instanceName,
                                              String environment, String region); void updateVersionStatus(VersionStatus newStatus); VersionStatus versionStatus(); void removeConfidenceOverride(Predicate<Version> filter); Version systemVersion(); Optional<OsVersionTarget> osVersionTarget(CloudName cloud); Set<OsVersionTarget> osVersionTargets(); void upgradeOsIn(CloudName cloudName, Version version, Optional<Duration> upgradeBudget, boolean force); OsVersionStatus osVersionStatus(); void updateOsVersionStatus(OsVersionStatus newStatus); HostName hostname(); ConfigServerMetrics metrics(); SystemName system(); CuratorDb curator(); AuditLogger auditLogger(); Metric metric(); JobControl jobControl();  }
@Test public void testDeployApplicationWithWarnings() { var context = tester.newDeploymentContext(); ApplicationPackage applicationPackage = new ApplicationPackageBuilder() .environment(Environment.prod) .region("us-west-1") .build(); ZoneId zone = ZoneId.from("prod", "us-west-1"); int warnings = 3; tester.configServer().generateWarnings(context.deploymentIdIn(zone), warnings); context.submit(applicationPackage).deploy(); assertEquals(warnings, context.deployment(zone) .metrics().warnings().get(DeploymentMetrics.Warning.all).intValue()); }