### Question:
ArrayTagSet implements TagList { @SuppressWarnings("PMD.AvoidArrayLoops") ArrayTagSet add(String k, String v) { Preconditions.checkNotNull(k, "key"); Preconditions.checkNotNull(v, "value"); if (length == 0) { return new ArrayTagSet(new String[] {k, v}); } else { String[] newTags = new String[length + 2]; int i = 0; for (; i < length && tags[i].compareTo(k) < 0; i += 2) { newTags[i] = tags[i]; newTags[i + 1] = tags[i + 1]; } if (i < length && tags[i].equals(k)) { newTags[i++] = k; newTags[i++] = v; System.arraycopy(tags, i, newTags, i, length - i); i = length; } else { newTags[i] = k; newTags[i + 1] = v; System.arraycopy(tags, i, newTags, i + 2, length - i); i = newTags.length; } return new ArrayTagSet(newTags, i); } } private  ArrayTagSet(String[] tags); private  ArrayTagSet(String[] tags, int length); @Override String getKey(int i); @Override String getValue(int i); @Override int size(); @Override ArrayTagSet filter(BiPredicate<String, String> predicate); @Override ArrayTagSet filterByKey(Predicate<String> predicate); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testAddNullKey() { ArrayTagSet ts = ArrayTagSet.EMPTY; Assertions.assertThrows(NullPointerException.class, () -> ts.add(null, "v")); }
@Test public void testAddNullValue() { ArrayTagSet ts = ArrayTagSet.EMPTY; Assertions.assertThrows(NullPointerException.class, () -> ts.add("k", null)); }