### Question:
JobRequest extends ExecutionEnvironmentDTO { public Optional<String> getCommandArgs() { return Optional.ofNullable(this.commandArgs); } JobRequest(@Valid final Builder builder); Optional<String> getCommandArgs(); Optional<String> getGroup(); Optional<String> getEmail(); Optional<Integer> getCpu(); Optional<Integer> getMemory(); Optional<Integer> getTimeout(); Optional<String> getGrouping(); Optional<String> getGroupingInstance(); static final int DEFAULT_TIMEOUT_DURATION; }### Answer:
@Test void testCommandArgsEdgeCases() { final JobRequest.Builder builder = new JobRequest.Builder(NAME, USER, VERSION, Lists.newArrayList(), Sets.newHashSet()); String commandArgs = " blah "; builder.withCommandArgs(commandArgs); Assertions .assertThat(builder.build().getCommandArgs().orElseThrow(IllegalArgumentException::new)) .isEqualTo(" blah "); commandArgs = " blah "; builder.withCommandArgs(commandArgs); Assertions .assertThat(builder.build().getCommandArgs().orElseThrow(IllegalArgumentException::new)) .isEqualTo(" blah "); commandArgs = " blah blah blah\nblah\tblah \"blah\" blah "; builder.withCommandArgs(commandArgs); Assertions .assertThat(builder.build().getCommandArgs().orElseThrow(IllegalArgumentException::new)) .isEqualTo(" blah blah blah\nblah\tblah \"blah\" blah "); builder.withCommandArgs(Lists.newArrayList("blah", "blah", " blah", "\nblah", "\"blah\"")); Assertions .assertThat(builder.build().getCommandArgs().orElseThrow(IllegalArgumentException::new)) .isEqualTo("blah blah blah \nblah \"blah\""); }