class AdminHealth implements SystemHealth {

    @Override
    public SystemHealthState getHealth () {
        boolean healthyState = AdminState.getHealthyStates().contains(adminManager.getAdminState());
        boolean longTimeInState = adminManager.getTimeInState().getSeconds() > 60 * 5;
        return (!healthyState) && longTimeInState ? SystemHealthState.ERROR : SystemHealthState.OK;
    }

    @Autowired  AdminHealth();

}