### Question:
ContainerAttribute { public boolean insert(T key, ContainerID value) throws SCMException { Preconditions.checkNotNull(key); Preconditions.checkNotNull(value); if (attributeMap.containsKey(key)) { if (attributeMap.get(key).add(value)) { return true; } else { if (!attributeMap.get(key).remove(value)) { LOG.error("Failure to remove the object from the Map.Key:{}, " + "ContainerID: {}", key, value); throw new SCMException("Failure to remove the object from the Map", FAILED_TO_CHANGE_CONTAINER_STATE); } attributeMap.get(key).add(value); return true; } } else { this.attributeMap.put(key, new TreeSet<>()); attributeMap.get(key).add(value); return true; } } ContainerAttribute(Map<T, NavigableSet<ContainerID>> attributeMap);  ContainerAttribute(); boolean insert(T key, ContainerID value); boolean hasKey(T key); boolean hasContainerID(T key, ContainerID id); boolean hasContainerID(T key, int id); void clearSet(T key); boolean remove(T key, ContainerID value); NavigableSet<ContainerID> getCollection(T key); void update(T currentKey, T newKey, ContainerID value);  }### Answer:
@Test public void testInsert() throws SCMException { ContainerAttribute<Integer> containerAttribute = new ContainerAttribute<>(); ContainerID id = new ContainerID(42); containerAttribute.insert(1, id); Assert.assertEquals(1, containerAttribute.getCollection(1).size()); Assert.assertTrue(containerAttribute.getCollection(1).contains(id)); ContainerID newId = new ContainerID(42); containerAttribute.insert(1, newId); Assert.assertEquals(1, containerAttribute.getCollection(1).size()); Assert.assertTrue(containerAttribute.getCollection(1).contains(newId)); }