HealthCheck implements HealthStatusChecker { @PostConstruct public void register() { errorBus.register(this); ErrorBus.setErrorBus(errorBus); } @Autowired  HealthCheck(HealthChecker healthChecker, @Value("${health.check.error.list.size:25}") int maxSize,
            @Value("${health.check.max.error.list.size:2500}") int hardMax, EventBus errorBus); @PostConstruct void register(); void setMaxSize(int maxSize); @Subscribe void onEvent(final ErrorEvent event); HealthStatus checkHealthStatus(); @Override boolean isOk();  }
@Test public void testRegister() { check.register(); verify(eventBus).register(check); }