public DockerInspectCommand getIpAndHost() {
    // Be sure to not use space in the argument, otherwise the
    // extract_values_delim method in container-executor binary
    // cannot parse the arguments correctly.
    super.addCommandArguments("format", "{{range(.NetworkSettings.Networks)}}"
        + "{{.IPAddress}},{{end}}{{.Config.Hostname}}");
    this.commandArguments = "--format={{range(.NetworkSettings.Networks)}}"
        + "{{.IPAddress}},{{end}}{{.Config.Hostname}}";
    return this;
  }
@Test
  public void testGetIpAndHost() throws Exception {
    dockerInspectCommand.getIpAndHost();
    assertEquals("inspect", StringUtils.join(",",
        dockerInspectCommand.getDockerCommandWithArguments()
            .get("docker-command")));
    assertEquals("{{range(.NetworkSettings.Networks)}}"
        + "{{.IPAddress}},{{end}}{{.Config.Hostname}}", StringUtils.join(",",
        dockerInspectCommand.getDockerCommandWithArguments().get("format")));
    assertEquals("foo", StringUtils.join(",",
        dockerInspectCommand.getDockerCommandWithArguments().get("name")));
    assertEquals(3,
        dockerInspectCommand.getDockerCommandWithArguments().size());
  }