@Test public void solrHealthIndicator() { this.context.register(SolrAutoConfiguration.class, ManagementServerProperties.class, HealthIndicatorAutoConfiguration.class); EnvironmentTestUtils.addEnvironment(this.context, "management.health.diskspace.enabled:false"); this.context.refresh(); Map<String, HealthIndicator> beans = this.context .getBeansOfType(HealthIndicator.class); assertThat(beans).hasSize(1); assertThat(beans.values().iterator().next().getClass()) .isEqualTo(SolrHealthIndicator.class); }
@Test public void solrHeathIndicator() { this.context.register(SolrAutoConfiguration.class, ManagementServerProperties.class, HealthIndicatorAutoConfiguration.class); EnvironmentTestUtils.addEnvironment(this.context, "management.health.diskspace.enabled:false"); this.context.refresh(); Map<String, HealthIndicator> beans = this.context .getBeansOfType(HealthIndicator.class); assertEquals(1, beans.size()); assertEquals(SolrHealthIndicator.class, beans.values().iterator().next().getClass()); }