Index: trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java	(revision 18823)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java	(revision 18824)
@@ -2,24 +2,18 @@
 package org.openstreetmap.josm.gui.io;
 
-import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 
 import org.openstreetmap.josm.data.osm.DataSet;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.Main;
 
 /**
  * Unit tests of {@link UploadDialogModel} class.
  */
-public class UploadDialogModelTest {
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    public JOSMTestRules test = new JOSMTestRules().preferences().main();
-
+@Main
+class UploadDialogModelTest {
     /**
      * Test of {@link UploadDialogModel}.
@@ -27,5 +21,5 @@
     @Test
     void testUploadDialogModel() {
-        assertNotNull(new UploadDialogModel());
+        assertDoesNotThrow(UploadDialogModel::new);
     }
 
@@ -65,3 +59,14 @@
     }
 
+    @Test
+    void testNonRegression23153() {
+        final DataSet dataSet = new DataSet();
+        dataSet.getChangeSetTags().put("hashtags", "duplicate");
+        final UploadDialogModel model = new UploadDialogModel();
+        final String hashTags = model.findHashTags("#duplicate #duplicate hashtag");
+        assertEquals("#duplicate", hashTags);
+        final String commentHashtags = UploadDialogModel.addHashTagsFromDataSet("There should be no " + hashTags, dataSet);
+        assertEquals("There should be no #duplicate", commentHashtags);
+    }
+
 }
