diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/agent/builder/AgentBuilderDefaultTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/agent/builder/AgentBuilderDefaultTest.java index 3651d4aa6b2..13e0d5ed2e0 100644 --- a/byte-buddy-dep/src/test/java/net/bytebuddy/agent/builder/AgentBuilderDefaultTest.java +++ b/byte-buddy-dep/src/test/java/net/bytebuddy/agent/builder/AgentBuilderDefaultTest.java @@ -38,6 +38,8 @@ public class AgentBuilderDefaultTest { + private static final String FOO = "foo"; + private static final byte[] QUX = new byte[]{1, 2, 3}, BAZ = new byte[]{4, 5, 6}; private static final Class REDEFINED = Foo.class, AUXILIARY = Bar.class; @@ -945,7 +947,7 @@ public void testDecoratedTransformation() throws Exception { .installOn(instrumentation); assertThat(classFileTransformer.transform(REDEFINED.getClassLoader(), REDEFINED.getName(), null, REDEFINED.getProtectionDomain(), QUX), is(BAZ)); verify(listener).onTransformation(new TypeDescription.ForLoadedType(REDEFINED), REDEFINED.getClassLoader(), dynamicType); - verify(listener).onComplete(REDEFINED.getName(), REDEFINED.getClassLoader());; + verify(listener).onComplete(REDEFINED.getName(), REDEFINED.getClassLoader()); verifyNoMoreInteractions(listener); verify(instrumentation).addTransformer(classFileTransformer, false); verifyNoMoreInteractions(instrumentation); @@ -1016,10 +1018,10 @@ public void testExecutingTransformerHandlesNullValue() throws Exception { mock(AgentBuilder.Default.BootstrapInjectionStrategy.class), mock(AgentBuilder.RawMatcher.class), mock(AgentBuilder.Default.Transformation.class)) - .transform(null, - null, - null, - null, + .transform(mock(ClassLoader.class), + FOO, + Object.class, + mock(ProtectionDomain.class), new byte[0]), nullValue(byte[].class)); } diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/ClassFileLocatorAgentBasedTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/ClassFileLocatorAgentBasedTest.java index ec3117b5e5c..2cb49aeb136 100644 --- a/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/ClassFileLocatorAgentBasedTest.java +++ b/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/ClassFileLocatorAgentBasedTest.java @@ -89,10 +89,10 @@ public void testExplicitLookup() throws Exception { @Test public void testExtractingTransformerHandlesNullValue() throws Exception { - assertThat(new ClassFileLocator.AgentBased.ExtractionClassFileTransformer(mock(ClassLoader.class), FOO).transform(null, - null, - null, - null, + assertThat(new ClassFileLocator.AgentBased.ExtractionClassFileTransformer(mock(ClassLoader.class), FOO).transform(mock(ClassLoader.class), + FOO, + Object.class, + mock(ProtectionDomain.class), new byte[0]), nullValue(byte[].class)); } diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategyTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategyTest.java index 5ad81be1a24..1ba7e9ebd8a 100644 --- a/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategyTest.java +++ b/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategyTest.java @@ -18,6 +18,7 @@ import java.lang.instrument.ClassDefinition; import java.lang.instrument.Instrumentation; import java.security.AccessController; +import java.security.ProtectionDomain; import java.util.Collections; import java.util.concurrent.Callable; @@ -257,10 +258,10 @@ public void testResetEmptyNoEffect() throws Exception { @Test public void testTransformerHandlesNullValue() throws Exception { - assertThat(new ClassReloadingStrategy.Strategy.ClassRedefinitionTransformer(Collections., ClassDefinition>emptyMap()).transform(null, - null, - null, - null, + assertThat(new ClassReloadingStrategy.Strategy.ClassRedefinitionTransformer(Collections., ClassDefinition>emptyMap()).transform(mock(ClassLoader.class), + FOO, + Object.class, + mock(ProtectionDomain.class), new byte[0]), nullValue(byte[].class)); }