use of org.springframework.boot.actuate.health.HealthContributor in project spring-boot by spring-projects.
the class AutoConfiguredHealthContributorRegistryTests method registerContributorWithGroupNameThrowsException.
@Test
void registerContributorWithGroupNameThrowsException() {
HealthContributorRegistry registry = new AutoConfiguredHealthContributorRegistry(Collections.emptyMap(), Arrays.asList("spring", "boot"));
assertThatIllegalStateException().isThrownBy(() -> registry.registerContributor("spring", mock(HealthContributor.class))).withMessage("HealthContributor with name \"spring\" clashes with group");
}
Aggregations