### Question:
AddBreakpointCommand extends AnnotatedCommand { static byte[] doTransform(byte[] origin, int lineNumber) { try { CtClass ctClass = ClassPool.getDefault().makeClass(new ByteArrayInputStream(origin)); ClassReader classMetaDataReader = new ClassReader(origin); ClassMetadataVisitor classMetadataVisitor = new ClassMetadataVisitor(); classMetaDataReader.accept(classMetadataVisitor, 0); logger.info("Class Metadata {}", classMetadataVisitor.getClassMeta()); ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES); ClassReader classReader = new ClassReader(origin); DebugClassVisitor debugClassVisitor = new DebugClassVisitor(ctClass.getName(), lineNumber, ctClass, classWriter, classMetadataVisitor.getClassMeta()); classReader.accept(debugClassVisitor, ClassReader.EXPAND_FRAMES); return classWriter.toByteArray(); } catch (Exception e) { e.printStackTrace(); } return null; }  @Argument(argName = "className", index = 0) void setClassName(String className); @Argument(argName = "lineNumber", index = 1) void setLineNumber(int lineNumber); @Override void process(CommandProcess commandProcess);  }### Answer:
@Test public void testDebug() { Instrumentation install = ByteBuddyAgent.install(); install.addTransformer((loader, className, classBeingRedefined, protectionDomain, classfileBuffer) -> { if (StringUtils.contains(className, "DebugTest")) { byte[] bytes = AddBreakpointCommand.doTransform(classfileBuffer, 20); DumpUtils.dump(bytes); return bytes; } return null; }, true); DebugTest debugTest = new DebugTest(); for (int i = 0; i < 10; i++) { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } debugTest.test(); } }