ARTEMIS-3772: update to mockito 4.4.0

This commit is contained in:
Robbie Gemmell 2022-04-08 13:38:41 +01:00
parent cfdb710a08
commit 9d943483d5
3 changed files with 5 additions and 7 deletions

View File

@ -24,7 +24,6 @@ import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times; import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
@ -73,7 +72,7 @@ public class WebSocketFrameEncoderTest {
verify(spy).write(ctx, msg, promise); verify(spy).write(ctx, msg, promise);
verify(ctx).write(msg, promise); verify(ctx).write(msg, promise);
verifyNoMoreInteractions(spy, ctx); verifyNoMoreInteractions(spy, ctx);
verifyZeroInteractions(promise); verifyNoMoreInteractions(promise);
} }
@Test @Test
@ -160,6 +159,6 @@ public class WebSocketFrameEncoderTest {
assertEquals(content.substring(offset), last.content().toString(StandardCharsets.UTF_8)); assertEquals(content.substring(offset), last.content().toString(StandardCharsets.UTF_8));
verifyNoMoreInteractions(spy, ctx); verifyNoMoreInteractions(spy, ctx);
verifyZeroInteractions(promise); verifyNoMoreInteractions(promise);
} }
} }

View File

@ -38,10 +38,9 @@ import org.junit.runner.RunWith;
import org.mockito.InjectMocks; import org.mockito.InjectMocks;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner; import org.mockito.junit.MockitoJUnitRunner;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyObject;
import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
@ -85,7 +84,7 @@ public class OpenTracingPluginTest {
verify(spanBuilder, atLeastOnce()).setAttribute(anyString(), anyString()); verify(spanBuilder, atLeastOnce()).setAttribute(anyString(), anyString());
verify(spanBuilder, atLeastOnce()).setSpanKind(any(SpanKind.class)); verify(spanBuilder, atLeastOnce()).setSpanKind(any(SpanKind.class));
verify(spanBuilder, atLeastOnce()).startSpan(); verify(spanBuilder, atLeastOnce()).startSpan();
verify(message, atLeastOnce()).setUserContext(anyObject(), anyObject()); verify(message, atLeastOnce()).setUserContext(any(Object.class), any(Object.class));
} }
@Test @Test

View File

@ -112,7 +112,7 @@
<maven.checkstyle.plugin.version>3.1.2</maven.checkstyle.plugin.version> <maven.checkstyle.plugin.version>3.1.2</maven.checkstyle.plugin.version>
<sevntu.checks.version>1.39.0</sevntu.checks.version> <sevntu.checks.version>1.39.0</sevntu.checks.version>
<checkstyle.version>9.2.1</checkstyle.version> <checkstyle.version>9.2.1</checkstyle.version>
<mockito.version>3.12.4</mockito.version> <mockito.version>4.4.0</mockito.version>
<jctools.version>2.1.2</jctools.version> <jctools.version>2.1.2</jctools.version>
<netty.version>4.1.75.Final</netty.version> <netty.version>4.1.75.Final</netty.version>
<hdrhistogram.version>2.1.12</hdrhistogram.version> <hdrhistogram.version>2.1.12</hdrhistogram.version>