From 39786e4249b22a1a83a21da323e25ed8a256e39f Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 4 May 2023 09:16:02 +0200 Subject: [PATCH] Use "List.of()" --- src/test/java/org/jabref/gui/search/GlobalSearchBarTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/jabref/gui/search/GlobalSearchBarTest.java b/src/test/java/org/jabref/gui/search/GlobalSearchBarTest.java index 595e5cde667..7fdfac326cc 100644 --- a/src/test/java/org/jabref/gui/search/GlobalSearchBarTest.java +++ b/src/test/java/org/jabref/gui/search/GlobalSearchBarTest.java @@ -92,7 +92,7 @@ void recordingSearchQueriesOnFocusLostOnly(FxRobot robot) throws InterruptedExce List lastSearchHistory = stateManager.getWholeSearchHistory().stream().toList(); assertFalse(lastSearchHistory.isEmpty()); - assertEquals(FXCollections.observableArrayList("Smith"), lastSearchHistory); + assertEquals(List.of("Smith"), lastSearchHistory); } @Test @@ -107,6 +107,6 @@ void emptyQueryIsNotRecorded(FxRobot robot) { DefaultTaskExecutor.runAndWaitInJavaFXThread(() -> hBox.requestFocus()); List lastSearchHistory = stateManager.getWholeSearchHistory().stream().toList(); - assertTrue(lastSearchHistory.isEmpty()); + assertEquals(List.of(), lastSearchHistory); } }