### Question:
SharedObjectPool { public void remove(T obj) { myWriteLock.lock(); try { myPool.remove(obj); } finally { myWriteLock.unlock(); } }  T get(T input); void remove(T obj); void runProcedure(PoolObjectProcedure<T> procedure); int size(); @Override String toString();  }### Answer:
@Test @SuppressWarnings({ "PMD.IntegerInstantiation", "deprecation" }) public void testRemove() { SharedObjectPool<Integer> pool = new SharedObjectPool<>(); Integer first = new Integer(1); Integer second = new Integer(1); Assert.assertNotSame(first, second); Assert.assertSame(first, pool.get(first)); Assert.assertSame(first, pool.get(second)); pool.remove(second); Assert.assertNotSame(first, pool.get(second)); Assert.assertSame(second, pool.get(second)); }