### Question:
Parameter { public int size() { return values.size(); } Parameter(String name, Collection<Value> values); String getName(); List<Value> getValues(); int size(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString(); static Builder parameter(String name);  }### Answer:
@Test void atLeastTwoValuesRequired() { Assertions.assertThrows(IllegalArgumentException.class, () -> new Parameter("a", Collections.emptyList())); Assertions.assertThrows(IllegalArgumentException.class, () -> new Parameter("a", Collections.singletonList(Value.value(0, 1)))); final Parameter twoValueParameter = new Parameter("a", Arrays.asList(Value.value(0, 1), Value.value(1, 2))); assertEquals(2, twoValueParameter.size()); }