### Question:
AbstractBaseLauncher implements RunnableLauncher { String getHost() { LOGGER.entering(); String val = ""; InstanceType type = getType(); if (commands.contains(HOST_ARG)) { val = commands.get(commands.indexOf(HOST_ARG) + 1); LOGGER.exiting(val); return val; } try { if (type.equals(InstanceType.SELENIUM_NODE) || type.equals(InstanceType.SELENIUM_HUB)) { val = getSeleniumConfigAsJsonObject().get("host").getAsString(); } } catch (JsonParseException | NullPointerException e) { } val = (StringUtils.isNotEmpty(val) && !val.equalsIgnoreCase("ip")) ? val : "localhost"; LOGGER.exiting(val); return val; }  final boolean isInitialized(); boolean isRunning();  }### Answer:
@Test public void testGetHost() { DummyProcessLauncher launcher; launcher = new DummyProcessLauncher(); assertEquals(launcher.getHost(), "localhost"); launcher = new DummyProcessLauncher(new String[] { ROLE_ARG, "hub" }); assertEquals(launcher.getHost(), "localhost"); launcher = new DummyProcessLauncher(new String[] { ROLE_ARG, "hub", HUB_CONFIG_ARG, HUB_CONFIG_FILE }); assertEquals(launcher.getHost(), "localhost"); launcher = new DummyProcessLauncher(new String[] { ROLE_ARG, "node" }); assertEquals(launcher.getHost(), "localhost"); launcher = new DummyProcessLauncher(new String[] { ROLE_ARG, "node", NODE_CONFIG_ARG, NODE_CONFIG_FILE }); assertEquals(launcher.getHost(), "localhost"); launcher = new DummyProcessLauncher(new String[] { "-host", "dummyhost" }); assertEquals(launcher.getHost(), "dummyhost"); }