@Test
    public void testAll() throws NoSuchFieldException, IllegalAccessException {
        PositiveAtomicCounter counter = new PositiveAtomicCounter();
        Field field = PositiveAtomicCounter.class.getDeclaredField("atom");
        field.setAccessible(true);
        AtomicInteger integer = (AtomicInteger) field.get(counter);
        integer.set(Integer.MAX_VALUE - 1);

        counter.incrementAndGet();
        counter.incrementAndGet();
        Assert.assertEquals(0, counter.get());

        counter.incrementAndGet();
        Assert.assertEquals(1, counter.get());
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/common/src/test/java/com/alipay/sofa/rpc/common/struct/PositiveAtomicCounterTest.java