diff --git a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java index 9500eb54..a1c5e8a5 100644 --- a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java +++ b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java @@ -7,6 +7,7 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.ArgumentMatchers; import org.telegram.abilitybots.api.db.DBContext; import org.telegram.abilitybots.api.objects.*; import org.telegram.abilitybots.api.sender.MessageSender; @@ -143,7 +144,9 @@ public class AbilityBotTest { Object backup = getDbBackup(); java.io.File backupFile = createBackupFile(backup); - when(sender.downloadFile(any(File.class))).thenReturn(backupFile); + // Support for null parameter matching since due to mocking API changes + when(sender.downloadFile(ArgumentMatchers.isNull())).thenReturn(backupFile); + bot.recoverDB().replies().get(0).actOn(update); verify(silent, times(1)).send(RECOVER_SUCCESS, GROUP_ID); diff --git a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java index ff8f55c6..267450fd 100644 --- a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java +++ b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java @@ -90,7 +90,7 @@ class MapDBContextTest { // Name - Type - Number of "rows" String expectedSummary = format("%s - Set - 1\n%s - Set - 1", TEST, anotherTest); - assertEquals("Actual DB summary does not match that of the expected", expectedSummary, actualSummary); + assertEquals(expectedSummary, actualSummary, "Actual DB summary does not match that of the expected"); } @Test @@ -101,7 +101,7 @@ class MapDBContextTest { // JSON String expectedInfo = "TEST - Set - 1"; - assertEquals("Actual DB structure info does not match that of the expected", expectedInfo, actualInfo); + assertEquals(expectedInfo, actualInfo, "Actual DB structure info does not match that of the expected"); } @Test