public byte[] instrument(
      ClassDetails classDetails,
      InstrumentationConfiguration config,
      ClassNodeProvider classNodeProvider) {
    PerfStatsCollector perfStats = PerfStatsCollector.getInstance();
    MutableClass mutableClass =
        perfStats.measure(
            "analyze class",
            () -> analyzeClass(classDetails.getClassBytes(), config, classNodeProvider));
    byte[] instrumentedBytes =
        perfStats.measure("instrument class", () -> instrumentToBytes(mutableClass));
    recordPackageStats(perfStats, mutableClass);
    return instrumentedBytes;
  }
@Test
  public void instrumentNativeMethod_generatesNativeBindingMethod() {
    ClassNode classNode = createClassWithNativeMethod();
    MutableClass clazz =
        new MutableClass(
            classNode, InstrumentationConfiguration.newBuilder().build(), classNodeProvider);
    instrumentor.instrument(clazz);

    String nativeMethodName = Shadow.directNativeMethodName("org.example.MyClass", "someFunction");
    MethodNode methodNode = findMethodNode(classNode, nativeMethodName);

    assertThat(clazz.classNode.interfaces).contains(Type.getInternalName(ShadowedObject.class));
    assertRoboDataField(clazz.getFields().get(0));

    assertThat(methodNode.access & Opcodes.ACC_NATIVE).isNotEqualTo(0);
    assertThat(methodNode.access & Opcodes.ACC_PRIVATE).isNotEqualTo(0);
    assertThat(methodNode.access & Opcodes.ACC_SYNTHETIC).isNotEqualTo(0);
  }