PropertyBuilder { StringBuilder addDnsIP(StringBuilder jvmArguments) { try { List<?> dnsServers = NetworkUtils.getDnsServers(); if (!dnsServers.isEmpty()) { return jvmArguments.append(" -Dngrinder.dns.ip=").append(StringUtils.join(dnsServers, ",")).append(" "); } } catch (Exception e) { LOGGER.error("Error while adding DNS IPs for the security mode. This might be occurred by not using " + "Oracle JDK : {}", e.getMessage()); } return jvmArguments; } PropertyBuilder(GrinderProperties properties, Directory baseDirectory, boolean securityEnabled, String securityLevel,
						   String hostString, String hostName, boolean server, boolean useXmxLimit, boolean enableLocalDNS, String additionalJavaOpt);  PropertyBuilder(GrinderProperties properties, Directory baseDirectory, boolean securityEnabled, String securityLevel,
						   String hostString, String hostName, boolean server, boolean useXmxLimit, String additionalJavaOpt);  PropertyBuilder(GrinderProperties properties, Directory baseDirectory, boolean securityEnabled, String securityLevel,
						   String hostString, String hostName, boolean server, boolean useXmxLimit);  PropertyBuilder(GrinderProperties properties, Directory baseDirectory, boolean securityEnabled,
						   String securityLevel, String hostString, String hostName, boolean server);  PropertyBuilder(GrinderProperties properties, Directory baseDirectory, boolean securityEnabled,
						   String securityLevel, String hostString, String hostName); String buildJVMArgument(); String buildJVMArgumentWithoutMemory(); @SuppressWarnings("ResultOfMethodCallIgnored") String buildCustomClassPath(final boolean useAbsolutePath); String rebaseUserLibraryClassPath(String classPath); String rebaseHostString(String hostString);  }
@Test public void testDnsServerResolver() throws DirectoryException { PropertyBuilder propertyBuilder = createPropertyBuilder("www.samples.com,:127.0.0.1"); StringBuilder builder = new StringBuilder(); propertyBuilder.addDnsIP(builder); assertThat(builder.toString(), containsString("ngrinder.dns.ip=")); assertThat(builder.length(), greaterThan(20)); }