public static boolean isCleared(final Reference<?> ref)
    {
        return ref.get() == null;
    }
@Test
    void validateIsCleared()
    {
        BigInteger bigInteger = new BigInteger("42");
        final WeakReference<BigInteger> ref = new WeakReference<>(bigInteger);
        assertFalse(References.isCleared(ref));
        bigInteger = null;
        System.gc();
        assertTrue(References.isCleared(ref));
    }