PropertyBuilder { public PropertyBuilder(GrinderProperties properties, Directory baseDirectory, boolean securityEnabled, String securityLevel, String hostString, String hostName, boolean server, boolean useXmxLimit, boolean enableLocalDNS, String additionalJavaOpt) { this.enableLocalDNS = enableLocalDNS; this.properties = checkNotNull(properties); this.baseDirectory = checkNotNull(baseDirectory); this.securityEnabled = securityEnabled; this.securityLevel = securityLevel; this.hostString = hostString; this.hostName = checkNotEmpty(hostName); this.server = server; this.useXmxLimit = useXmxLimit; this.additionalJavaOpt = additionalJavaOpt; } 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 testPropertyBuilder() throws DirectoryException { System.setProperty("java.library.path", System.getProperty("java.library.path") + File.pathSeparator + new File("./native_lib").getAbsolutePath()); PropertyBuilder propertyBuilder = createPropertyBuilder("www.samples.com,:127.0.0.1"); assertTrue(propertyBuilder.rebaseHostString("www.samples.com,:127.0.0.1") .matches("www.samples.com:.*,:127.0.0.1")); assertThat(propertyBuilder.rebaseHostString("www.samples.com:74.125.128.99"), is("www.samples.com:74.125.128.99")); assertThat(propertyBuilder.rebaseHostString(":127.0.0.1"), is(":127.0.0.1")); }