Code example for ReferenceQueue

Methods: poll, remove

0
 
	/** 
	 * @tests java.lang.ref.ReferenceQueue#remove(long) 
	 */ 
	public void test_removeJ() throws Exception { 
                assertNull("Queue is empty.", rq.poll());
                assertNull("Queue is empty.", rq.remove((long) 1));
                Thread ct = new Thread(new ChildThread());
                ct.start();
                Reference ret = rq.remove(0L);
                assertNotNull("Delayed remove failed.", ret);
	} 
 
	/** 
	 * @tests java.lang.ref.ReferenceQueue#ReferenceQueue() 
	 */ 
	public void test_Constructor() { 
		assertTrue("Used for testing.", true);
	} 
 
	protected void setUp() {