@Override
    public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
        if (ipv6Result == null) {
            boolean result = false;
            try {
                result = hasIPv6Loopback();
            } catch (SocketException e) {
                log.warn("Could not determine presence of IPv6 loopback address", e);
            }

            if (result) {
                ipv6Result = ConditionEvaluationResult.enabled("Found IPv6 loopback");
            } else {
                ipv6Result = ConditionEvaluationResult.disabled("Could not find IPv6 loopback");
            }
        }
        return ipv6Result;
    }
A JUnit 5 condition that checks whether the current host has an IPv6 loopback address.

@author Daniel Theuke (daniel.theuke@heuboe.de)
tests/src/test/java/net/devh/boot/grpc/test/util/RequireIPv6Condition.java