@Test
public void metricEndpointCustomPublicMetrics() {
load(CustomPublicMetricsConfig.class, PublicMetricsAutoConfiguration.class,
EndpointAutoConfiguration.class);
MetricsEndpoint endpoint = this.context.getBean(MetricsEndpoint.class);
Map<String, Object> metrics = endpoint.invoke();
// Custom metrics
assertTrue(metrics.containsKey("foo"));
// System metrics still available