Source:
public ServerContext build() { ImmutableMap.Builder<String,Object> builder = new ImmutableMap.Builder<String, Object>() .put("--initial-token", initialToken) .put("--single", single) .put("--memory", memory) .put("--Threads", numThreads) .put("--HandshakeTimeout", handshakeTimeout) .put("--sequencer-cache-size", seqCache) .put("--log-size-quota-percentage", logSizeQuota) .put("--batch-size", batchSize) .put("--metadata-retention", retention); if (logPath != null) { builder.put("--log-path", logPath); } if (managementBootstrapEndpoint != null) { builder.put("--management-server", managementBootstrapEndpoint); } builder .put("--no-verify", noVerify) .put("--no-sync", noSync) .put("--address", address) .put("--cache-heap-ratio", cacheSizeHeapRatio) .put("--enable-tls", tlsEnabled) .put("--enable-tls-mutual-auth", tlsMutualAuthEnabled) .put("--tls-protocols", tlsProtocols) .put("--tls-ciphers", tlsCiphers) .put("--keystore", keystore) .put("--keystore-password-file", keystorePasswordFile) .put("--truststore", truststore) .put("--truststore-password-file", truststorePasswordFile) .put("--enable-sasl-plain-text-auth", saslPlainTextAuth) .put("--cluster-id", clusterId) .put("--implementation", implementation) .put("<port>", port); if (prefix.equals("")) { prefix = "test:" + port; } builder.put("--Prefix", prefix); if (implementation.equals("local")) { builder.put("client", TestThreadGroups.NETTY_CLIENT_GROUP.get()); builder.put("boss", TestThreadGroups.NETTY_BOSS_GROUP.get()); builder.put("worker", TestThreadGroups.NETTY_CLIENT_GROUP.get()); } ServerContext sc = new ServerContext(builder.build()); sc.setServerRouter(serverRouter); return sc; }

Target:
public ServerContext build() { ImmutableMap.Builder<String,Object> builder = new ImmutableMap.Builder<String, Object>() .put("--initial-token", initialToken) .put("--single", single) .put("--memory", memory) .put("--Threads", numThreads) .put("--HandshakeTimeout", handshakeTimeout) .put("--sequencer-cache-size", seqCache) .put("--log-size-quota-percentage", logSizeLimitPercentage) .put("--batch-size", batchSize) .put("--metadata-retention", retention); if (logPath != null) { builder.put("--log-path", logPath); } if (managementBootstrapEndpoint != null) { builder.put("--management-server", managementBootstrapEndpoint); } builder .put("--no-verify", noVerify) .put("--no-sync", noSync) .put("--address", address) .put("--cache-heap-ratio", cacheSizeHeapRatio) .put("--enable-tls", tlsEnabled) .put("--enable-tls-mutual-auth", tlsMutualAuthEnabled) .put("--tls-protocols", tlsProtocols) .put("--tls-ciphers", tlsCiphers) .put("--keystore", keystore) .put("--keystore-password-file", keystorePasswordFile) .put("--truststore", truststore) .put("--truststore-password-file", truststorePasswordFile) .put("--enable-sasl-plain-text-auth", saslPlainTextAuth) .put("--cluster-id", clusterId) .put("--implementation", implementation) .put("<port>", port); if (prefix.equals("")) { prefix = "test:" + port; } builder.put("--Prefix", prefix); if (implementation.equals("local")) { builder.put("client", TestThreadGroups.NETTY_CLIENT_GROUP.get()); builder.put("boss", TestThreadGroups.NETTY_BOSS_GROUP.get()); builder.put("worker", TestThreadGroups.NETTY_CLIENT_GROUP.get()); } ServerContext sc = new ServerContext(builder.build()); sc.setServerRouter(serverRouter); return sc; }