### Question:
AtomixAgent { static AtomixConfig createConfig(Namespace namespace) { final List<File> configFiles = namespace.getList("config"); final String memberId = namespace.getString("member"); final Address address = namespace.get("address"); final String host = namespace.getString("host"); final String rack = namespace.getString("rack"); final String zone = namespace.getString("zone"); final List<NodeConfig> bootstrap = namespace.getList("bootstrap"); final boolean multicastEnabled = namespace.getBoolean("multicast"); final String multicastGroup = namespace.get("multicast_group"); final Integer multicastPort = namespace.get("multicast_port"); System.setProperty("atomix.data", namespace.getString("data_dir")); AtomixConfig config; if (configFiles != null && !configFiles.isEmpty()) { System.setProperty("atomix.config.resources", ""); config = Atomix.config(configFiles); } else { config = Atomix.config(); } if (memberId != null) { config.getClusterConfig().getNodeConfig().setId(memberId); } if (address != null) { config.getClusterConfig().getNodeConfig().setAddress(address); } if (host != null) { config.getClusterConfig().getNodeConfig().setHostId(host); } if (rack != null) { config.getClusterConfig().getNodeConfig().setRackId(rack); } if (zone != null) { config.getClusterConfig().getNodeConfig().setZoneId(zone); } if (bootstrap != null && !bootstrap.isEmpty()) { config.getClusterConfig().setDiscoveryConfig(new BootstrapDiscoveryConfig().setNodes(bootstrap)); } if (multicastEnabled) { config.getClusterConfig().getMulticastConfig().setEnabled(true); if (multicastGroup != null) { config.getClusterConfig().getMulticastConfig().setGroup(multicastGroup); } if (multicastPort != null) { config.getClusterConfig().getMulticastConfig().setPort(multicastPort); } if (bootstrap == null || bootstrap.isEmpty()) { config.getClusterConfig().setDiscoveryConfig(new MulticastDiscoveryConfig()); } } return config; }  static void main(String[] args);  }### Answer:
@Test public void testCreateConfig() { final List<String> unknown = new ArrayList<>(); final String path = getClass().getClassLoader().getResource("test.conf").getPath(); final String[] args = new String[]{"-c", path, "--cluster.node.id", "member-1", "--cluster.node.address", "localhost:5000"}; final Namespace namespace = AtomixAgent.parseArgs(args, unknown); final Namespace extraArgs = AtomixAgent.parseUnknown(unknown); extraArgs.getAttrs().forEach((key, value) -> System.setProperty(key, value.toString())); final AtomixConfig config = AtomixAgent.createConfig(namespace); assertEquals("member-1", config.getClusterConfig().getNodeConfig().getId().id()); assertEquals("localhost:5000", config.getClusterConfig().getNodeConfig().getAddress().toString()); }