### Question:
ObjectAddedUpdater implements ThreadSafeMultimap.ListUpdater<V> { @Nullable @Override public List<V> update(@Nonnull List<V> values) { if (values == ThreadSafeMultimap.NO_VALUE) { return null; } else if (!Iterables.contains(values, newObject)) { final List<V> result = ThreadSafeMultimap.copy(values); result.add(newObject); return result; } else { return null; } } ObjectAddedUpdater(@Nonnull V newObject); @Nullable @Override List<V> update(@Nonnull List<V> values);  }### Answer:
@Test public void testShouldAddObjectIfNotExists() throws Exception { final TestObject addedObject = new TestObject(111); multimap.update(3, new ObjectAddedUpdater<TestObject>(addedObject)); assertTrue(multimap.get(3).contains(addedObject)); }
@Test public void testShouldNotAddObjectIfAlreadyExists() throws Exception { int sizeBefore = multimap.get(3).size(); final TestObject oldObject = multimap.get(3).get(0); multimap.update(3, new ObjectAddedUpdater<TestObject>(oldObject)); assertEquals(sizeBefore, multimap.get(3).size()); }