NameResolverProvider { @Nullable public Iterable<String> searchDomains() { return searchDomains; } 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 searchDomains() { assertNull(builder.build().searchDomains()); List<String> searchDomains = Collections.singletonList("searchDomains"); builder.searchDomains(searchDomains); assertThat(builder.build().searchDomains()).isEqualTo(searchDomains); }
@Test public void searchDomainsBadValues() { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> builder.searchDomains(null)); }