Index: trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 18844)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 18847)
@@ -22,4 +22,5 @@
 import org.junit.jupiter.api.Timeout;
 import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.openstreetmap.josm.TestUtils;
@@ -45,5 +46,4 @@
 import org.openstreetmap.josm.gui.tagging.presets.items.Key;
 import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-import org.openstreetmap.josm.tools.Logging;
 
 import nl.jqno.equalsverifier.EqualsVerifier;
@@ -745,19 +745,22 @@
     }
 
+    static Set<Class<? extends Match>> testEqualsContract() {
+        TestUtils.assumeWorkingEqualsVerifier();
+        final Set<Class<? extends Match>> matchers = TestUtils.getJosmSubtypes(Match.class);
+        assertTrue(matchers.size() >= 10, "There should be at least 10 matchers from JOSM core");
+        return matchers;
+    }
+
     /**
      * Unit test of methods {@link Match#equals} and {@link Match#hashCode}, including all subclasses.
-     */
-    @Test
-    void testEqualsContract() {
-        TestUtils.assumeWorkingEqualsVerifier();
-        Set<Class<? extends Match>> matchers = TestUtils.getJosmSubtypes(Match.class);
-        assertTrue(matchers.size() >= 10); // if it finds less than 10 classes, something is broken
-        for (Class<?> c : matchers) {
-            Logging.debug(c.toString());
-            EqualsVerifier.forClass(c).usingGetClass()
-                .suppress(Warning.NONFINAL_FIELDS, Warning.INHERITED_DIRECTLY_FROM_OBJECT)
-                .withPrefabValues(TaggingPreset.class, newTaggingPreset("foo"), newTaggingPreset("bar"))
-                .verify();
-        }
+     * @param clazz The class to test
+     */
+    @ParameterizedTest
+    @MethodSource
+    void testEqualsContract(Class<? extends Match> clazz) {
+        EqualsVerifier.forClass(clazz).usingGetClass()
+            .suppress(Warning.NONFINAL_FIELDS, Warning.INHERITED_DIRECTLY_FROM_OBJECT)
+            .withPrefabValues(TaggingPreset.class, newTaggingPreset("foo"), newTaggingPreset("bar"))
+            .verify();
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/tools/SearchCompilerQueryWizardTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/SearchCompilerQueryWizardTest.java	(revision 18844)
+++ trunk/test/unit/org/openstreetmap/josm/tools/SearchCompilerQueryWizardTest.java	(revision 18847)
@@ -7,20 +7,11 @@
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
 /**
  * Unit tests of {@link SearchCompilerQueryWizard} class.
  */
+@I18n("de")
 class SearchCompilerQueryWizardTest {
-    /**
-     * Base test environment is enough
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().i18n("de");
-
     private static String constructQuery(String s) {
         return SearchCompilerQueryWizard.constructQuery(s);
@@ -264,3 +255,12 @@
                 "type:node AND (*=forward OR *=backward)");
     }
+
+    /**
+     * Test for ticket <a href="https://josm.openstreetmap.de/ticket/23212>#23212</a>.
+     * {@code key:} search should become {@code nwr["key"]}
+     */
+    @Test
+    void testTicket23212() {
+        assertQueryEquals("  nwr[\"name\"];\n", "name:");
+    }
 }
