More refactor for JVMTI redefinition run tests (1/3)

Does as much as possible without making git get confused about the
provenance of files. Follow up CLs will move the files into the
appropriate places.

NOTE: BROKEN WITHOUT A FOLLOW-UP CL TO CHANGE FILE NAMES!

Bug: 32072923
Test: None
Change-Id: I1d66b42a5041d4ea1a0e8eaa61d55422a507e26f
diff --git a/test/949-in-memory-transform/src/Main.java b/test/949-in-memory-transform/src/Main.java
index 1a6b224..cd733b9 100644
--- a/test/949-in-memory-transform/src/Main.java
+++ b/test/949-in-memory-transform/src/Main.java
@@ -14,11 +14,15 @@
  * limitations under the License.
  */
 
+package art;
+
+import static art.Redefinition.doCommonClassRedefinition;
+
 import java.util.Base64;
 import java.lang.reflect.*;
 import java.nio.ByteBuffer;
 
-public class Main {
+public class Test949 {
   /**
    * base64 encoded class/dex file for
    * public class Transform {
@@ -82,8 +86,7 @@
     "AOAAAAAGAAAAAQAAAAABAAABIAAAAgAAACABAAABEAAAAQAAAFwBAAACIAAADgAAAGIBAAADIAAA" +
     "AgAAABMCAAAAIAAAAQAAAB4CAAAAEAAAAQAAACwCAAA=");
 
-  public static void main(String[] args) throws Exception {
-    art.Main.bindAgentJNIForClass(Main.class);
+  public static void run() throws Exception {
     ClassLoader loader;
     try {
       // Art uses this classloader to do in-memory dex files. There is no support for defineClass
@@ -117,9 +120,4 @@
     doCommonClassRedefinition(transform_class, TRANSFORMED_CLASS_BYTES, TRANSFORMED_DEX_BYTES);
     say_hi_method.invoke(t);
   }
-
-  // Transforms the class
-  private static native void doCommonClassRedefinition(Class<?> target,
-                                                       byte[] class_file,
-                                                       byte[] dex_file);
 }