Code example for ArrayList

Methods: remove, trimToSize

0
            // expected 
        } 
    } 
 
    public void test_trimToSize_02() { 
        ArrayList list = new ArrayList(Arrays.asList(new String[] { "a", "b", "c", 
                "d", "e", "f", "g" })); 
        list.remove("a"); 
        list.remove("f"); 
        list.trimToSize(); 
    } 
 
    /** 
     * @test java.util.ArrayList#addAll(int, Collection) 
     */ 
    public void test_addAll() { 
        ArrayList list = new ArrayList(); 
        list.add("one"); 
        list.add("two"); 
        assertEquals(2, list.size());