@Override
    public Set<String> resolve(String name, RecordType first, RecordType... rest) {
        var types = EnumSet.of(first, rest);

        return resolveAll(name)
                .stream()
                .filter(addressString -> {
                    if (types.contains(RecordType.A) && IP.isV4(addressString)) return true;
                    if (types.contains(RecordType.AAAA) && IP.isV6(addressString)) return true;
                    return false;
                })
                .collect(Collectors.toSet());
    }
When true, only records added with {@link MockNameResolver#addReverseRecord(String, String)} are considered by
{@link MockNameResolver#resolveHostname(String)}. Otherwise the latter returns the IP address by reversing the lookup
implicitly.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNameResolver.java