title: No qualifying bean of type 'org.springframework.boot.actuate.health.HealthEndpoint' in controller test
body: <p>I wrote a controller which combines actuator info.</p>
  <pre class="lang-java prettyprint-override"><code>@RestController
  @Slf4j
  public class AppStatusRestController {
      private final HealthEndpoint healthEndpoint;
      private final InfoEndpoint infoEndpoint;
  
      public AppStatusRestController(HealthEndpoint healthEndpoint, InfoEndpoint infoEndpoint) {
          this.healthEndpoint = healthEndpoint;
          this.infoEndpoint = infoEndpoint;
      }
  
      @GetMapping(&quot;/status&quot;)
      public Status status() {
          Map&lt;String, Object&gt; info = infoEndpoint.info();
          return Status.builder()
                  .status(healthEndpoint.health().getStatus().getCode())
                  .appName(&quot;My application&quot;)
                  .version(((Map&lt;String, Object&gt;) info.get(&quot;build&quot;)).get(&quot;version&quot;).toString())
                  .buildDateTime(((Map&lt;String, Object&gt;) info.get(&quot;build&quot;)).get(&quot;timestamp&quot;).toString())
                  .build();
      }
  }
  </code></pre>
  <p>In my test I get an error <code>No qualifying bean of type 'org.springframework.boot.actuate.health.HealthEndpoint'</code>.</p>
  <pre class="lang-java prettyprint-override"><code>@SpringBootTest(classes = AppStatusRestController.class)
  @TestPropertySource(properties = &quot;management.endpoints.web.exposure.include=*&quot;)
  class AppStatusRestControllerTest {
  
      @Test
      void status() {
      }
  }
  </code></pre>
  <p>How can I actiavate default spring actuator beans in controller test(<code>@SpringBootTest</code>/<code>@WebMvcTest</code>)?</p>