diff --git a/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java b/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java index bb125cc28d..4ffc54cc54 100644 --- a/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java +++ b/src/test/java/redis/clients/jedis/UnifiedJedisCustomCommandsTest.java @@ -46,7 +46,7 @@ public void testSendCommandWithProtocolCommandAndByteArrayArgs() { byte[][] args = { "arg1".getBytes(), "arg2".getBytes() }; CommandArguments commandArguments = mock(CommandArguments.class); CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK"); @@ -74,7 +74,7 @@ public void testSendBlockingCommandWithProtocolCommandAndByteArrayArgs() { CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); when(commandArgumentsWithArgs.blocking()).thenReturn(commandArgumentsBlocking); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK"); @@ -98,7 +98,7 @@ public void testSendCommandWithProtocolCommandAndStringArgs() { String[] args = { "arg1", "arg2" }; CommandArguments commandArguments = mock(CommandArguments.class); CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK"); @@ -126,7 +126,7 @@ public void testSendBlockingCommandWithProtocolCommandAndStringArgs() { CommandArguments commandArgumentsWithArgs = mock(CommandArguments.class); when(commandArgumentsWithArgs.blocking()).thenReturn(commandArgumentsBlocking); - when(commandArguments.addObjects(args)).thenReturn(commandArgumentsWithArgs); + when(commandArguments.addObjects((Object[]) args)).thenReturn(commandArgumentsWithArgs); when(commandObjects.commandArguments(cmd)).thenReturn(commandArguments); when(commandExecutor.executeCommand(any())).thenReturn("OK");