public void testVector() throws IOException {
String classname = ClassTest.class.getName().replace('.', '/') + ".class";
InputStream is = getClass().getClassLoader().getResourceAsStream(classname);
assertNotNull("Unable to find resource " + classname + "in caller classloader");
ClassFile clazzfile = new ClassFile(is);
assertEquals("ClassTest", clazzfile.getName());
assertEquals("ClassFileTest.java", clazzfile.getSourceFile());
MethodInfo[] methods = clazzfile.getMethods();
assertEquals(3, methods.length);
assertHasMethod("void <init>()", 2, methods);
assertHasMethod("void testTwoLines()", 2, methods);
assertHasMethod("void testOneLine()",
// in JDK 1.4 we get four lines