### Question:
DockerHealthCheck { public static DockerHealthCheck.Builder fromCommand(List<String> command) { Preconditions.checkArgument(command.size() > 0, "command must not be empty"); Preconditions.checkArgument( command.stream().allMatch(Objects::nonNull), "command must not contain null elements"); return new Builder(ImmutableList.copyOf(command)); } private  DockerHealthCheck(
      ImmutableList<String> command,
      @Nullable Duration interval,
      @Nullable Duration timeout,
      @Nullable Duration startPeriod,
      @Nullable Integer retries); static DockerHealthCheck.Builder fromCommand(List<String> command); List<String> getCommand(); Optional<Duration> getInterval(); Optional<Duration> getTimeout(); Optional<Duration> getStartPeriod(); Optional<Integer> getRetries();  }### Answer:
@Test public void testBuild_invalidCommand() { try { DockerHealthCheck.fromCommand(ImmutableList.of()); Assert.fail(); } catch (IllegalArgumentException ex) { Assert.assertEquals("command must not be empty", ex.getMessage()); } try { DockerHealthCheck.fromCommand(Arrays.asList("CMD", null)); Assert.fail(); } catch (IllegalArgumentException ex) { Assert.assertEquals("command must not contain null elements", ex.getMessage()); } }