@Test public void testWithArgumentsNullList() { NullPointerException e = assertThrows(NullPointerException.class, () -> { builder.withArguments(null); }); assertThat(e.getMessage()).isEqualTo("Arguments cannot be null."); }
public ScriptExecutionBuilder withArguments(final List<Argument> arguments) { if (arguments == null) throw new NullPointerException("Arguments cannot be null."); this.arguments = arguments.isEmpty() ? Collections.<Argument> emptyList() : Collections.unmodifiableList(arguments); return this; }
ScriptExecutionBuilder { public ScriptExecutionBuilder withArguments(final List<Argument> arguments) { if (arguments == null) throw new NullPointerException("Arguments cannot be null."); this.arguments = arguments.isEmpty() ? Collections.<Argument> emptyList() : Collections.unmodifiableList(arguments); return this; } }
ScriptExecutionBuilder { public ScriptExecutionBuilder withArguments(final List<Argument> arguments) { if (arguments == null) throw new NullPointerException("Arguments cannot be null."); this.arguments = arguments.isEmpty() ? Collections.<Argument> emptyList() : Collections.unmodifiableList(arguments); return this; } private  ScriptExecutionBuilder(final String scriptName); }
ScriptExecutionBuilder { public ScriptExecutionBuilder withArguments(final List<Argument> arguments) { if (arguments == null) throw new NullPointerException("Arguments cannot be null."); this.arguments = arguments.isEmpty() ? Collections.<Argument> emptyList() : Collections.unmodifiableList(arguments); return this; } private  ScriptExecutionBuilder(final String scriptName); static ScriptExecutionBuilder getBuilder(final String scriptName); void addWithReplace(final String recordName, final Record record); Collection<String> build(); String getScriptName(); ScriptExecutionBuilder withArguments(final List<Argument> arguments); }
ScriptExecutionBuilder { public ScriptExecutionBuilder withArguments(final List<Argument> arguments) { if (arguments == null) throw new NullPointerException("Arguments cannot be null."); this.arguments = arguments.isEmpty() ? Collections.<Argument> emptyList() : Collections.unmodifiableList(arguments); return this; } private  ScriptExecutionBuilder(final String scriptName); static ScriptExecutionBuilder getBuilder(final String scriptName); void addWithReplace(final String recordName, final Record record); Collection<String> build(); String getScriptName(); ScriptExecutionBuilder withArguments(final List<Argument> arguments);  }