@Test public void shouldNotCopyAnyParameterEntriesWhenUsingCloneContructor() { SimpleParameter parameter = new SimpleParameter(); parameter.setEntries(new HashSet<ParameterEntry>(Arrays.asList(new SimpleParameterEntry()))); SimpleParameter clonedParameter = new SimpleParameter(parameter); assertThat(clonedParameter).hasNoEntries(); }
public void setEntries(Set<ParameterEntry> entries) { this.entries.addAll(entries); }
SimpleParameter implements Parameter { public void setEntries(Set<ParameterEntry> entries) { this.entries.addAll(entries); } }
SimpleParameter implements Parameter { public void setEntries(Set<ParameterEntry> entries) { this.entries.addAll(entries); } SimpleParameter();  SimpleParameter(Parameter parameter); }
SimpleParameter implements Parameter { public void setEntries(Set<ParameterEntry> entries) { this.entries.addAll(entries); } SimpleParameter();  SimpleParameter(Parameter parameter); @Override ParameterKey getKey(); @Override String getName(); void setName(String name); SimpleParameter withName(String name); @Override List<Level> getLevels(); void setLevels(List<Level> levels); SimpleParameter withLevel(Level level); @Override int getInputLevels(); void setInputLevels(int inputLevels); SimpleParameter withInputLevels(int inputLevels); @Override Set<ParameterEntry> getEntries(); void setEntries(Set<ParameterEntry> entries); @Override char getArraySeparator(); void setArraySeparator(char arraySeparator); SimpleParameter withArraySeparator(char arraySeparator); @Override boolean isCacheable(); void setCacheable(boolean cacheable); SimpleParameter notCacheable(); @Override boolean isNullable(); void setNullable(boolean nullable); SimpleParameter nullable(); @Override boolean isIdentifyEntries(); void setIdentifyEntries(boolean identifyEntries); SimpleParameter identifyEntries(); }
SimpleParameter implements Parameter { public void setEntries(Set<ParameterEntry> entries) { this.entries.addAll(entries); } SimpleParameter();  SimpleParameter(Parameter parameter); @Override ParameterKey getKey(); @Override String getName(); void setName(String name); SimpleParameter withName(String name); @Override List<Level> getLevels(); void setLevels(List<Level> levels); SimpleParameter withLevel(Level level); @Override int getInputLevels(); void setInputLevels(int inputLevels); SimpleParameter withInputLevels(int inputLevels); @Override Set<ParameterEntry> getEntries(); void setEntries(Set<ParameterEntry> entries); @Override char getArraySeparator(); void setArraySeparator(char arraySeparator); SimpleParameter withArraySeparator(char arraySeparator); @Override boolean isCacheable(); void setCacheable(boolean cacheable); SimpleParameter notCacheable(); @Override boolean isNullable(); void setNullable(boolean nullable); SimpleParameter nullable(); @Override boolean isIdentifyEntries(); void setIdentifyEntries(boolean identifyEntries); SimpleParameter identifyEntries();  }