diff --git a/designer-base/src/test/java/com/fr/design/record/analyzer/BytebuddyRedefineTest.java b/designer-base/src/test/java/com/fr/design/record/analyzer/BytebuddyRedefineTest.java index f9ec6e21eb..aade4591e6 100644 --- a/designer-base/src/test/java/com/fr/design/record/analyzer/BytebuddyRedefineTest.java +++ b/designer-base/src/test/java/com/fr/design/record/analyzer/BytebuddyRedefineTest.java @@ -5,6 +5,7 @@ import com.fr.third.net.bytebuddy.agent.ByteBuddyAgent; import com.fr.third.net.bytebuddy.asm.Advice; import com.fr.third.net.bytebuddy.dynamic.loading.ClassReloadingStrategy; import com.fr.third.net.bytebuddy.matcher.ElementMatchers; +import org.junit.Assert; import org.junit.Test; /** @@ -31,7 +32,7 @@ public class BytebuddyRedefineTest { TestClass testClass = new TestClass(); testClass.testPrint(); } catch (Throwable throwable) { - + Assert.assertNotNull("expected throw exception", throwable); } } @@ -52,9 +53,9 @@ public class BytebuddyRedefineTest { TestClass testClass = new TestClass(); String print = testClass.testPrint(); - System.out.println(TestTransferValueAdvice.intField); - System.out.println(TestTransferValueAdvice.stringField); - System.out.println(TestTransferValueAdvice.objectField); + Assert.assertEquals(10, TestTransferValueAdvice.intField); + Assert.assertEquals("[test]stringField", TestTransferValueAdvice.stringField); + Assert.assertEquals("[test]objectField", TestTransferValueAdvice.objectField); } @@ -75,7 +76,8 @@ public class BytebuddyRedefineTest { TestClass testClass = new TestClass(); String print = testClass.testPrint(); - System.out.println(print); + Assert.assertEquals("[test]Modify Return Value", print); + } } \ No newline at end of file