### Question:
AddExtraHostContainerDecorator implements ContainerDecorator { public static boolean isValidArg(String arg) { final String[] args = arg.split(":"); if (args.length != 2) { return false; } final String ip = args[1]; return InetAddresses.isInetAddress(ip); } AddExtraHostContainerDecorator(final List<String> extraHosts); @Override void decorateHostConfig(final Job job, final Optional<String> dockerVersion,
                                 final HostConfig.Builder hostConfig); @Override void decorateContainerConfig(final Job job, final ImageInfo imageInfo,
                                      final Optional<String> dockerVersion,
                                      final ContainerConfig.Builder containerConfig); static boolean isValidArg(String arg);  }### Answer:
@Test public void invalidArgument() { assertThat(isValidArg("abcdefg"), is(false)); }
@Test public void invalidArguments() { assertThat(isValidArg("abc:def:gh"), is(false)); }
@Test public void testValidArgument() { assertThat(isValidArg("foo:169.254.169.254"), is(true)); }