### Question:
MultiValue { public List<V> getValues() { return values; } MultiValue(K key, V value);  MultiValue(K key, List<V> value);  MultiValue(); K getKey(); void setKey(K key); List<V> getValues(); void setValues(List<V> values); MultiValue<K, V> addValue(V value); @Override String toString();  }### Answer:
@Test public void itShouldCreateAsString() { MultiValue<String,String> mv = new MultiValue<>("Test", "This is a test"); Assert.assertNotNull(mv); Assert.assertEquals("This is a test", mv.getValues().toArray()[0]); }
@Test public void itShouldCreateAsList() { ArrayList<String> values = new ArrayList<>(); values.add("This is a test"); MultiValue<String,String> mv = new MultiValue<>("Test", values); Assert.assertNotNull(mv); Assert.assertEquals("This is a test", mv.getValues().toArray()[0]); }