From f6a4c0283c253705457bb509ea0404f77e82e2ec Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Tue, 13 Aug 2024 16:32:04 +0200 Subject: [PATCH] Remove illegal mocking of enum type. --- .../implementation/bind/annotation/SuperBinderTest.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/bind/annotation/SuperBinderTest.java b/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/bind/annotation/SuperBinderTest.java index ae48c2b8122..71e01b12e36 100644 --- a/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/bind/annotation/SuperBinderTest.java +++ b/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/bind/annotation/SuperBinderTest.java @@ -19,9 +19,6 @@ public class SuperBinderTest extends AbstractAnnotationBinderTest { @Mock private TypeDescription.Generic genericTargetType; - @Mock - private Super.Instantiation instantiation; - public SuperBinderTest() { super(Super.class); } @@ -32,8 +29,7 @@ public void setUp() throws Exception { super.setUp(); when(target.getType()).thenReturn(genericTargetType); when(genericTargetType.asErasure()).thenReturn(targetType); - when(annotation.strategy()).thenReturn(instantiation); - when(instantiation.proxyFor(targetType, implementationTarget, annotationDescription)).thenReturn(stackManipulation); + when(annotation.strategy()).thenReturn(Super.Instantiation.CONSTRUCTOR); when(annotation.constructorParameters()).thenReturn(new Class[0]); when(targetType.asErasure()).thenReturn(targetType); } @@ -50,7 +46,6 @@ public void testAssignableBinding() throws Exception { MethodDelegationBinder.ParameterBinding parameterBinding = Super.Binder.INSTANCE .bind(annotationDescription, source, target, implementationTarget, assigner, Assigner.Typing.STATIC); assertThat(parameterBinding.isValid(), is(true)); - verify(instantiation).proxyFor(targetType, implementationTarget, annotationDescription); } @Test