MockClassHasNativeVisitor cv = new MockClassHasNativeVisitor();
String className =
this.getClass().getCanonicalName() + "$" + ClassWithNative.class.getSimpleName();
ClassReader cr = new ClassReader(className);
cr.accept(cv, 0 /* flags */);
assertArrayEquals(new String[] { "native_method" }, cv.getMethodsFound());
assertTrue(cv.hasNativeMethods());