Ts[7] = Ts[3].insert(ATerm.parse("3")); Ts[7] = Ts[7].insert(ATerm.parse("2")); Ts[7] = Ts[7].insert(ATerm.parse("1")); test(Ts[7].equals(Ts[4]), "insert-1");  test(Ts[1].insert(ATerm.parse("1")).equals(ATerm.parse("[1]")), "insert-2");    test(Ts[4].insertAt(ATerm.parse("7"), 7).equals(Ts[5]), "insert-3");     test(Ts[5].getPrefix().equals(Ts[4]), "prefix-1"); test(Ts[5].getLast().equals(ATerm.parse("7")), "last-1");
  protected  void testATermList()    throws ParseError, TestFailedException   {    ATerm[] T = new ATerm[10];    ATermList[] Ts = new ATermList[10];    System.out.println("testing ATermList class");    T[0] = world.parse("[0,1,2,3,4,5,4,3,2,1]");    Ts[0] = (ATermList)T[0];    T[1] = world.parse("[]");    Ts[1] = world.empty;    T[2] = world.parse("[1,2,3]");    Ts[2] = (ATermList)T[2];    T[3] = world.parse("[4,5,6]");    Ts[3] = (ATermList)T[3];    T[4] = world.parse("[1,2,3,4,5,6]");    Ts[4] = (ATermList)T[4];    T[5] = world.parse("[1,2,3,4,5,6,7]");    Ts[5] = (ATermList)T[5];	T[6] = world.parse("f(abc{[label,val]})");    //{ test length    test(Ts[0].getLength() == 10, "length-1");    //}    //{ test search    test(Ts[0].indexOf(world.makeInt(2), 0) == 2, "indexOf-1");    test(Ts[0].indexOf(world.makeInt(10), 0) == -1, "indexOf-2");    test(Ts[0].indexOf(world.makeInt(0), 0) == 0, "indexOf-3");    test(Ts[0].indexOf(world.makeInt(5), 0) == 5, "indexOf-4");    //}    //{ test lastIndexOf		System.out.println("Ts[0] = " + Ts[0] + ", lastIndexOf(1) = " +											 Ts[0].lastIndexOf(world.makeInt(1), -1));    test(Ts[0].lastIndexOf(world.makeInt(1), -1) == 9, "lastIndexOf-1");    test(Ts[0].lastIndexOf(world.makeInt(0), -1) == 0, "lastIndexOf-2");    test(Ts[0].lastIndexOf(world.makeInt(10), -1) == -1, "lastIndexOf-3");    //}    //{ test concat    test(Ts[2].concat(Ts[3]).equals(Ts[4]), "concat-1");    test(Ts[0].concat(Ts[1]).equals(Ts[0]), "concat-2");    //}    //{ test append    test(Ts[4].append(world.makeInt(7)).equals(Ts[5]), "append-1");    //}  }