@@ -0,0 +1,608 @@
+package xdean.jex.util.lang;%0D%0A%0D%0Aimport static org.junit.Assert.*;%0D%0A%0D%0Aimport java.util.concurrent.atomic.AtomicBoolean;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Aimport xdean.jex.util.task.If;%0D%0A%0D%0Apublic class TestFinalizeSupport %7B%0D%0A  @Test%0D%0A  public void test() throws Exception %7B%0D%0A    AtomicBoolean called = new AtomicBoolean(false);%0D%0A    FinalizeSupport.finalize(new Object(),%0D%0A        () -%3E If.that(called.compareAndSet(false, true)).ordo(() -%3E fail(%22Finalize runnable called more than once!%22)));%0D%0A    System.gc();%0D%0A    Thread.sleep(10);%0D%0A    System.gc();%0D%0A    Thread.sleep(10);%0D%0A    assertTrue(called.get());%0D%0A  %7D%0D%0A%7D%0D%0A

test FinalizeSupport