class JPAHealthCheck implements HealthCheck {

                @Override
    public Mono<Result> check() {
        return Mono.fromCallable(entityManagerFactory::createEntityManager)
            .map(entityManager -> entityManager.isOpen())
            .map(open -> {
                if (open) {
                    return healthy(componentName());
                }

                @Inject public  JPAHealthCheck(EntityManagerFactory entityManagerFactory);

}