@@ -0,0 +1,931 @@
+package org.apache.bcel.util;%0D%0A%0D%0Aimport java.util.Iterator;%0D%0A%0D%0Aimport org.apache.bcel.AbstractTestCase;%0D%0Aimport org.apache.bcel.generic.IADD;%0D%0Aimport org.apache.bcel.generic.ILOAD;%0D%0Aimport org.apache.bcel.generic.ISTORE;%0D%0Aimport org.apache.bcel.generic.InstructionHandle;%0D%0Aimport org.apache.bcel.generic.InstructionList;%0D%0A%0D%0Apublic class InstructionFinderTest extends AbstractTestCase %7B%0D%0A%0D%0A%09public void testSearch() %7B%0D%0A%09%09InstructionList il = new InstructionList();%0D%0A%09%09il.append(new ILOAD(1));%0D%0A%09%09il.append(new ILOAD(2));%0D%0A%09%09il.append(new IADD());%0D%0A%09%09il.append(new ISTORE(3));%0D%0A%09%09InstructionFinder finder = new InstructionFinder(il);%0D%0A%09%09%0D%0A%09%09Iterator it = finder.search(%22ILOAD IADD%22, il.getInstructionHandles()%5B0%5D, null );%0D%0A%09%09InstructionHandle%5B%5D ihs = (InstructionHandle%5B%5D)it.next();%0D%0A%09%09assertEquals(2, ihs.length);%0D%0A%09%09assertEquals(ihs%5B0%5D.getInstruction(), new ILOAD(2));%0D%0A%09%09assertEquals(ihs%5B1%5D.getInstruction(), new IADD());%0D%0A%09%7D%0D%0A%7D%0D%0A

add test for 45440