From f14d1ccf5d2b36a33ac2e21199a275761d078c41 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Mon, 21 Aug 2023 10:22:48 +0200 Subject: [PATCH] chore(deps): update dependency org.mockito:mockito-core to v5 (#1433) * chore(deps): update dependency org.mockito:mockito-core to v5 * Use type on ArgumentMatcher for varargs https://github.com/mockito/mockito/wiki/Draft-Mockito-5-release-notes#what-is-the-effect-of-this-new-method --- server/pom.xml | 2 +- .../java/io/kroki/server/service/GraphVizServiceTest.java | 2 +- .../test/java/io/kroki/server/service/PikchrServiceTest.java | 2 +- .../test/java/io/kroki/server/service/VegaServiceTest.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/pom.xml b/server/pom.xml index 0c9c9212d..b47a71aa5 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -18,7 +18,7 @@ 4.4.4 5.9.3 3.24.2 - 4.11.0 + 5.4.0 2.0.7 11 11 diff --git a/server/src/test/java/io/kroki/server/service/GraphVizServiceTest.java b/server/src/test/java/io/kroki/server/service/GraphVizServiceTest.java index 67cca23e1..54f593304 100644 --- a/server/src/test/java/io/kroki/server/service/GraphVizServiceTest.java +++ b/server/src/test/java/io/kroki/server/service/GraphVizServiceTest.java @@ -22,7 +22,7 @@ public class GraphVizServiceTest { public void should_call_graphviz_with_correct_arguments() throws Throwable { Vertx vertx = Vertx.vertx(); Commander commanderMock = mock(Commander.class); - when(commanderMock.execute(any(), any())).thenReturn("graphviz".getBytes()); + when(commanderMock.execute(any(), any(String[].class))).thenReturn("graphviz".getBytes()); HashMap config = new HashMap<>(); config.put("KROKI_SAFE_MODE", "unsafe"); config.put("KROKI_DOT_BIN_PATH", "/path/to/dot"); diff --git a/server/src/test/java/io/kroki/server/service/PikchrServiceTest.java b/server/src/test/java/io/kroki/server/service/PikchrServiceTest.java index 4699ad452..799a4256d 100644 --- a/server/src/test/java/io/kroki/server/service/PikchrServiceTest.java +++ b/server/src/test/java/io/kroki/server/service/PikchrServiceTest.java @@ -22,7 +22,7 @@ public class PikchrServiceTest { public void should_call_pikchr_with_correct_arguments() throws Throwable { Vertx vertx = Vertx.vertx(); Commander commanderMock = mock(Commander.class); - when(commanderMock.execute(any(), any())).thenReturn("pikchr".getBytes()); + when(commanderMock.execute(any(), any(String[].class))).thenReturn("pikchr".getBytes()); HashMap config = new HashMap<>(); config.put("KROKI_SAFE_MODE", "unsafe"); config.put("KROKI_PIKCHR_BIN_PATH", "/path/to/pikchr"); diff --git a/server/src/test/java/io/kroki/server/service/VegaServiceTest.java b/server/src/test/java/io/kroki/server/service/VegaServiceTest.java index b6d5b28c8..7c72359c0 100644 --- a/server/src/test/java/io/kroki/server/service/VegaServiceTest.java +++ b/server/src/test/java/io/kroki/server/service/VegaServiceTest.java @@ -22,7 +22,7 @@ public class VegaServiceTest { public void should_call_vega_with_correct_arguments() throws Throwable { Vertx vertx = Vertx.vertx(); Commander commanderMock = mock(Commander.class); - when(commanderMock.execute(any(), any())).thenReturn("vega".getBytes()); + when(commanderMock.execute(any(), any(String[].class))).thenReturn("vega".getBytes()); HashMap config = new HashMap<>(); config.put("KROKI_SAFE_MODE", "unsafe"); config.put("KROKI_VEGA_BIN_PATH", "/path/to/vega"); @@ -45,7 +45,7 @@ public void should_call_vega_with_correct_arguments() throws Throwable { public void should_call_vega_lite_with_correct_arguments() throws Throwable { Vertx vertx = Vertx.vertx(); Commander commanderMock = mock(Commander.class); - when(commanderMock.execute(any(), any())).thenReturn("vega-lite".getBytes()); + when(commanderMock.execute(any(), any(String[].class))).thenReturn("vega-lite".getBytes()); HashMap config = new HashMap<>(); config.put("KROKI_SAFE_MODE", "unsafe"); config.put("KROKI_VEGA_BIN_PATH", "/path/to/vega");