NameResolverProvider { @Nullable public ResolvedAddressTypes resolvedAddressTypes() { return resolvedAddressTypes; } NameResolverProvider(Build build); static NameResolverSpec builder(); Duration cacheMaxTimeToLive(); Duration cacheMinTimeToLive(); Duration cacheNegativeTimeToLive(); boolean isDisableOptionalRecord(); boolean isDisableRecursionDesired(); boolean isPreferNative(); boolean isRoundRobinSelection(); @Nullable LoopResources loopResources(); int maxPayloadSize(); int maxQueriesPerResolve(); int ndots(); Duration queryTimeout(); @Nullable ResolvedAddressTypes resolvedAddressTypes(); @Nullable Iterable<String> searchDomains(); @Override boolean equals(Object o); @Override int hashCode(); DnsAddressResolverGroup newNameResolverGroup(LoopResources defaultLoopResources, boolean defaultPreferNative);  }
@Test public void resolvedAddressTypes() { assertNull(builder.build().resolvedAddressTypes()); builder.resolvedAddressTypes(ResolvedAddressTypes.IPV4_ONLY); assertThat(builder.build().resolvedAddressTypes()).isEqualTo(ResolvedAddressTypes.IPV4_ONLY); }
@Test public void resolvedAddressTypesBadValues() { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> builder.resolvedAddressTypes(null)); }