@Test
    public void testRemoveNoneExistingElementFromCollection() throws Exception
    {
        // Setup test fixture.
        final ArrayList<String> collection = new ArrayList<>();
        collection.add( "existing value" );
        final Cache<String, ArrayList<String>> cache = new DefaultLocalCacheStrategy().createCache( "test" );
        cache.put( "existing key", collection );

        // Execute system under test.
        Throwable result = null;
        try
        {
            CacheUtil.removeValueFromMultiValuedCache( cache, "existing key", "non-existing value" );
        }
        catch ( Throwable t )
        {
            result = t;
        }

        // Verify results.
        assertNull( result );
        assertTrue( collection.contains( "existing value" ) );
    }
Verifies that {@link CacheUtil#removeValueFromMultiValuedCache(Cache, Serializable, Object)} does not change the cache or
throw an exception, while an element is being removed from a cached collection that does not contain that entity..
xmppserver/src/test/java/org/jivesoftware/util/CacheUtilTest.java