Index: /trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java	(revision 18037)
@@ -9,10 +9,8 @@
 import javax.swing.JPanel;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.actions.ExpertToggleAction.ExpertModeChangeListener;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.actions.ExpertToggleAction.ExpertModeChangeListener;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -21,12 +19,7 @@
  * @since 11224
  */
+// We need prefs to store expert mode state.
+@BasicPreferences
 class ExpertToggleActionTest {
-    /**
-     * We need prefs to store expert mode state.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test {@link ExpertToggleAction#addVisibilitySwitcher(java.awt.Component)}
Index: /trunk/test/unit/org/openstreetmap/josm/command/AddCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/AddCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/AddCommandTest.java	(revision 18037)
@@ -7,6 +7,4 @@
 import java.util.ArrayList;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -18,22 +16,18 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link AddCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class AddCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
-
     /**
      * Test if the add command is executed correctly and sets the modified flag.
Index: /trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java	(revision 18037)
@@ -12,6 +12,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -25,22 +23,18 @@
 import org.openstreetmap.josm.data.osm.WayData;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
+
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link AddPrimitivesCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class AddPrimitivesCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
-
     /**
      * Test if the add command is executed correctly and does not set the modified flag.
Index: /trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java	(revision 18037)
@@ -5,6 +5,6 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -12,7 +12,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -26,21 +23,19 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChangeCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class ChangeCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
     private CommandTestData testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/ChangeMembersCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/ChangeMembersCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/ChangeMembersCommandTest.java	(revision 18037)
@@ -8,7 +8,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -19,21 +16,19 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChangeMembersCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class ChangeMembersCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
     private CommandTestDataWithRelation testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java	(revision 18037)
@@ -5,6 +5,6 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -13,7 +13,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -25,21 +22,19 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChangeNodesCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class ChangeNodesCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
     private CommandTestData testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java	(revision 18037)
@@ -14,7 +14,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -27,21 +24,19 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
+
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChangePropertyCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class ChangePropertyCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
     private CommandTestData testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java	(revision 18037)
@@ -11,7 +11,4 @@
 import java.util.Collection;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestData;
@@ -21,21 +18,19 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChangePropertyKeyCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class ChangePropertyKeyCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
     private CommandTestData testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java	(revision 18037)
@@ -10,7 +10,4 @@
 import java.util.ArrayList;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -20,21 +17,19 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChangeRelationMemberRoleCommand} class.
  */
+@I18n
+// We need prefs for nodes.
+@BasicPreferences
 class ChangeRelationMemberRoleCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
     private CommandTestDataWithRelation testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/CommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/CommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/CommandTest.java	(revision 18037)
@@ -4,6 +4,4 @@
 import java.util.Arrays;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -16,22 +14,18 @@
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link Command} class.
  */
+@I18n
+// We need prefs for nodes / data sets.
+@BasicPreferences
 public class CommandTest {
-
-    /**
-     * We need prefs for nodes / data sets.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
-
     /**
      * Unit test of methods {@link Command#equals} and {@link Command#hashCode}.
Index: /trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java	(revision 18037)
@@ -5,6 +5,6 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -14,7 +14,4 @@
 import java.util.NoSuchElementException;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -27,21 +24,19 @@
 import org.openstreetmap.josm.data.osm.WaySegment;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
+
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link DeleteCommand} class.
  */
+// We need prefs for nodes.
+@BasicPreferences
+@I18n
 class DeleteCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
     private CommandTestDataWithRelation testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java	(revision 18037)
@@ -13,7 +13,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -28,20 +25,17 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link PurgeCommand} class.
  */
+// We need prefs for nodes.
+@BasicPreferences
 class PurgeCommandTest {
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
     private CommandTestDataWithRelation testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java	(revision 18037)
@@ -9,7 +9,4 @@
 import java.util.Collections;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -19,21 +16,17 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link RemoveNodesCommand} class.
  */
+// We need prefs for nodes.
+@BasicPreferences
 class RemoveNodesCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
     private CommandTestDataWithRelation testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java	(revision 18037)
@@ -4,6 +4,6 @@
 import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -11,7 +11,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -20,21 +17,17 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link SelectCommand} class.
  */
+// We need prefs for nodes.
+@BasicPreferences
 class SelectCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
     private CommandTestDataWithRelation testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java	(revision 18037)
@@ -19,7 +19,4 @@
 import java.util.Collections;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
@@ -29,22 +26,18 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.bugreport.ReportedException;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link SequenceCommand} class.
  */
+// We need prefs for nodes.
+@BasicPreferences
 class SequenceCommandTest {
-
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
     private CommandTestDataWithRelation testData;
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/PreferencesUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/PreferencesUtilsTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/PreferencesUtilsTest.java	(revision 18037)
@@ -4,24 +4,15 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import net.trajano.commons.testing.UtilityClassTestUtil;
 import org.junit.jupiter.api.BeforeEach;
 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 net.trajano.commons.testing.UtilityClassTestUtil;
 
 /**
  * Unit tests for class {@link PreferencesUtils}.
  */
+@BasicPreferences
 class PreferencesUtilsTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Setup test.
Index: /trunk/test/unit/org/openstreetmap/josm/data/UserIdentityManagerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/UserIdentityManagerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/UserIdentityManagerTest.java	(revision 18037)
@@ -7,28 +7,27 @@
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+import static org.junit.jupiter.api.Assertions.fail;
+
+import java.util.function.Function;
+import java.util.stream.Stream;
+
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.data.osm.UserInfo;
 import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
 
 /**
  * Unit tests of {@link UserIdentityManager} class.
  */
+@BasicPreferences
 class UserIdentityManagerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     private static UserInfo newUserInfo() {
         return newUserInfo(1, "a description");
@@ -180,9 +179,24 @@
     }
 
-    /**
-     * Preferences include neither an url nor a user name => we have an anonymous user
-     */
-    @Test
-    void testInitFromPreferences1() {
+    static Stream<Arguments> testInitFromPreferences() {
+        return Stream.of(
+          Arguments.of((Function<UserIdentityManager, Boolean>) UserIdentityManager::isAnonymous,
+            new String[] {"osm-server.url", null, "osm-server.username", null},
+            "Preferences include neither an url nor a user name => we have an anonymous user"),
+          Arguments.of((Function<UserIdentityManager, Boolean>) UserIdentityManager::isAnonymous,
+            new String[] {"osm-server.url", "http://api.openstreetmap.org", "osm-server.username", null},
+            "Preferences include neither an url nor a user name => we have an anonymous user"),
+          Arguments.of((Function<UserIdentityManager, Boolean>) UserIdentityManager::isPartiallyIdentified,
+            new String[] {"osm-server.url", "http://api.openstreetmap.org", "osm-server.username", "test"},
+            "Preferences include an user name => we have a partially identified user")
+        );
+    }
+
+    @ParameterizedTest
+    @MethodSource
+    void testInitFromPreferences(Function<UserIdentityManager, Boolean> verifier, String[] config, String failureMessage) {
+        if (config.length % 2 != 0) {
+            fail("The arguments must be paired");
+        }
         UserIdentityManager im = UserIdentityManager.getInstance();
 
@@ -194,10 +208,11 @@
 
         try {
-            Config.getPref().put("osm-server.url", null);
-            Config.getPref().put("osm-server.username", null);
+            for (int i = 0; i < config.length / 2; i++) {
+                Config.getPref().put(config[2 * i], config[2 * i + 1]);
+            }
 
             im.initFromPreferences();
 
-            assertTrue(im.isAnonymous());
+            assertTrue(verifier.apply(im), failureMessage);
         } finally {
             Config.getPref().addPreferenceChangeListener(im);
@@ -206,12 +221,13 @@
 
     /**
-     * Preferences include neither an url nor a user name => we have an anonymous user
-     */
-    @Test
-    void testInitFromPreferences2() {
-        UserIdentityManager im = UserIdentityManager.getInstance();
-
-        // reset it
-        im.setAnonymous();
+     * Preferences include an user name which is different from the current
+     * user name and we are currently fully identifed => josm user becomes
+     * partially identified
+     *
+     * Note: Test #4 since the other three are parameterized
+     */
+    @Test
+    void testInitFromPreferences4() {
+        UserIdentityManager im = UserIdentityManager.getInstance();
 
         // for this test we disable the listener
@@ -219,31 +235,8 @@
 
         try {
+            im.setFullyIdentified("test1", newUserInfo());
+
             Config.getPref().put("osm-server.url", "http://api.openstreetmap.org");
-            Config.getPref().put("osm-server.username", null);
-
-            im.initFromPreferences();
-
-            assertTrue(im.isAnonymous());
-        } finally {
-            Config.getPref().addPreferenceChangeListener(im);
-        }
-    }
-
-    /**
-     * Preferences include an user name => we have a partially identified user
-     */
-    @Test
-    void testInitFromPreferences3() {
-        UserIdentityManager im = UserIdentityManager.getInstance();
-
-        // for this test we disable the listener
-        Config.getPref().removePreferenceChangeListener(im);
-
-        try {
-            // reset it
-            im.setAnonymous();
-
-            Config.getPref().put("osm-server.url", "http://api.openstreetmap.org");
-            Config.getPref().put("osm-server.username", "test");
+            Config.getPref().put("osm-server.username", "test2");
 
             im.initFromPreferences();
@@ -256,30 +249,4 @@
 
     /**
-     * Preferences include an user name which is different from the current
-     * user name and we are currently fully identifed => josm user becomes
-     * partially identified
-     */
-    @Test
-    void testInitFromPreferences4() {
-        UserIdentityManager im = UserIdentityManager.getInstance();
-
-        // for this test we disable the listener
-        Config.getPref().removePreferenceChangeListener(im);
-
-        try {
-            im.setFullyIdentified("test1", newUserInfo());
-
-            Config.getPref().put("osm-server.url", "http://api.openstreetmap.org");
-            Config.getPref().put("osm-server.username", "test2");
-
-            im.initFromPreferences();
-
-            assertTrue(im.isPartiallyIdentified());
-        } finally {
-            Config.getPref().addPreferenceChangeListener(im);
-        }
-    }
-
-    /**
      * Preferences include an user name which is the same as the current
      * user name and we are currently fully identifed => josm user remains
Index: /trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCacheManagerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCacheManagerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCacheManagerTest.java	(revision 18037)
@@ -9,25 +9,18 @@
 import java.util.logging.Logger;
 
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import net.trajano.commons.testing.UtilityClassTestUtil;
 import org.apache.commons.jcs3.access.CacheAccess;
 import org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskCacheAttributes;
 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 net.trajano.commons.testing.UtilityClassTestUtil;
+import org.junit.jupiter.api.Timeout;
 
 /**
  * Unit tests for class {@link JCSCacheManager}.
  */
+@Timeout(20)
+@BasicPreferences
 class JCSCacheManagerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().timeout(20000);
-
     /**
      * Tests that {@code JCSCacheManager} satisfies utility class criteria.
Index: /trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java	(revision 18037)
@@ -17,9 +17,7 @@
 import java.util.stream.Stream;
 
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 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;
 
 /**
@@ -27,4 +25,6 @@
  * @author Michael Zangl
  */
+// We need prefs for using primitives
+@BasicPreferences
 class TagCollectionTest {
     private final Tag tagA = new Tag("k", "v");
@@ -35,11 +35,4 @@
     private final Tag tagNullKey = new Tag(null, "b");
     private final Tag tagNullValue = new Tag("k2", null);
-
-    /**
-     * We need prefs for using primitives
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     private void assertTagCounts(TagCollection collection, int a, int b, int c, int d) {
Index: /trunk/test/unit/org/openstreetmap/josm/data/osm/event/SelectionEventManagerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/event/SelectionEventManagerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/osm/event/SelectionEventManagerTest.java	(revision 18037)
@@ -9,6 +9,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
 import org.openstreetmap.josm.data.osm.DataSelectionListener;
@@ -16,7 +14,7 @@
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.util.GuiHelper;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -25,4 +23,5 @@
  * @since 12048
  */
+@BasicPreferences
 class SelectionEventManagerTest {
     private final class SelectionListener implements DataSelectionListener {
@@ -39,10 +38,4 @@
         }
     }
-
-    /**
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: /trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 18037)
@@ -19,7 +19,4 @@
 import java.util.Set;
 
-import org.junit.Assert;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -43,23 +40,20 @@
 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
 import org.openstreetmap.josm.gui.tagging.presets.items.Key;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.Assert;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
 
 /**
  * Unit tests for class {@link SearchCompiler}.
  */
+// We need prefs for this. We access preferences when creating OSM primitives
+@BasicPreferences
+@Timeout(30)
 class SearchCompilerTest {
-
-    /**
-     * We need prefs for this. We access preferences when creating OSM primitives.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().timeout(30000);
-
     private static final class SearchContext {
         final DataSet ds = new DataSet();
Index: /trunk/test/unit/org/openstreetmap/josm/data/preferences/NamedColorPropertyTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/preferences/NamedColorPropertyTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/preferences/NamedColorPropertyTest.java	(revision 18037)
@@ -11,12 +11,10 @@
 import javax.swing.UIManager;
 
+import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.openstreetmap.josm.data.Preferences;
-import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -24,11 +22,7 @@
  * @author Michael Zangl
  */
+// This is a preference test
+@BasicPreferences
 class NamedColorPropertyTest {
-    /**
-     * This is a preference test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
     private NamedColorProperty base;
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/preferences/PreferencesWriterTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/preferences/PreferencesWriterTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/preferences/PreferencesWriterTest.java	(revision 18037)
@@ -13,16 +13,20 @@
 import java.util.TreeMap;
 
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.Version;
-import org.openstreetmap.josm.spi.preferences.Setting;
+import org.openstreetmap.josm.spi.preferences.AbstractSetting;
 import org.openstreetmap.josm.spi.preferences.ListListSetting;
 import org.openstreetmap.josm.spi.preferences.ListSetting;
-import org.openstreetmap.josm.spi.preferences.AbstractSetting;
+import org.openstreetmap.josm.spi.preferences.MapListSetting;
+import org.openstreetmap.josm.spi.preferences.Setting;
 import org.openstreetmap.josm.spi.preferences.StringSetting;
-import org.openstreetmap.josm.spi.preferences.MapListSetting;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests for class {@link PreferencesWriter}.
  */
+// This is a preference test
+@BasicPreferences
 class PreferencesWriterTest {
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/preferences/StrokePropertyTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/preferences/StrokePropertyTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/preferences/StrokePropertyTest.java	(revision 18037)
@@ -7,10 +7,8 @@
 import java.awt.BasicStroke;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -18,12 +16,7 @@
  * @author Michael Zangl
  */
+// This is a preference test
+@BasicPreferences
 class StrokePropertyTest {
-    /**
-     * This is a preference test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test {@link StrokeProperty#get()}
Index: /trunk/test/unit/org/openstreetmap/josm/data/projection/CustomProjectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/projection/CustomProjectionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/projection/CustomProjectionTest.java	(revision 18037)
@@ -8,11 +8,9 @@
 import java.util.stream.Stream;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.CustomProjection.Polarity;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -20,12 +18,7 @@
  * @author Michael Zangl
  */
+// Need pref to load pref
+@BasicPreferences
 class CustomProjectionTest {
-    /**
-     * Need pref to load pref.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test {@link CustomProjection#parseAngle(String, String)}
Index: /trunk/test/unit/org/openstreetmap/josm/data/protobuf/ProtobufTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/protobuf/ProtobufTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/protobuf/ProtobufTest.java	(revision 18037)
@@ -32,8 +32,7 @@
 import org.openstreetmap.josm.data.vector.VectorWay;
 import org.openstreetmap.josm.io.Compression;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 
 /**
@@ -60,7 +59,4 @@
     }
 
-    @RegisterExtension
-    JOSMTestRules josmTestRules = new JOSMTestRules().preferences();
-
     private Number bytesToVarInt(int... bytes) {
         byte[] byteArray = new byte[bytes.length];
@@ -108,4 +104,5 @@
     }
 
+    @BasicPreferences
     @Test
     void testRead_17_26028_50060() throws IOException {
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateRelationTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateRelationTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateRelationTest.java	(revision 18037)
@@ -4,6 +4,4 @@
 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.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -13,20 +11,13 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * JUnit Test of "Duplicate relation" validation test.
  */
+@BasicPreferences
 class DuplicateRelationTest {
-
-    /**
-     * Setup test by initializing JOSM preferences and projection.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     static class ExpectedResult {
         final int code;
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java	(revision 18037)
@@ -17,7 +17,4 @@
 import java.util.Set;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -32,8 +29,10 @@
 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader;
 import org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 import org.openstreetmap.josm.tools.Logging;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -41,12 +40,7 @@
  * @see OpeningHourTest
  */
+@I18n
+@BasicPreferences
 class OpeningHourTestTest {
-    /**
-     * We need preferences for this. We check strings so we need i18n.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().i18n();
-
     private OpeningHourTest openingHourTest;
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/util/EntitiesTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/util/EntitiesTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/util/EntitiesTest.java	(revision 18037)
@@ -2,10 +2,6 @@
 package org.openstreetmap.josm.data.validation.util;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import net.trajano.commons.testing.UtilityClassTestUtil;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import net.trajano.commons.testing.UtilityClassTestUtil;
 
 /**
@@ -13,12 +9,4 @@
  */
 class EntitiesTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Tests that {@code Entities} satisfies utility class criteria.
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/util/MultipleNameVisitorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/util/MultipleNameVisitorTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/util/MultipleNameVisitorTest.java	(revision 18037)
@@ -6,24 +6,15 @@
 import java.util.Arrays;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests for class {@link MultipleNameVisitor}.
  */
+@BasicPreferences
 class MultipleNameVisitorTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Non-regression test for bug #11967.
Index: /trunk/test/unit/org/openstreetmap/josm/data/vector/VectorRelationTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/vector/VectorRelationTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/vector/VectorRelationTest.java	(revision 18037)
@@ -1,10 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.vector;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import java.util.Arrays;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -14,4 +8,10 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+import java.util.Arrays;
+
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
+
 /**
  * Test class for {@link VectorRelation}
@@ -19,8 +19,6 @@
  * @since 17862
  */
+@BasicPreferences
 class VectorRelationTest {
-    @RegisterExtension
-    JOSMTestRules rule = new JOSMTestRules();
-
     @Test
     void testMembers() {
Index: /trunk/test/unit/org/openstreetmap/josm/data/vector/VectorWayTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/vector/VectorWayTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/data/vector/VectorWayTest.java	(revision 18037)
@@ -2,5 +2,16 @@
 package org.openstreetmap.josm.data.vector;
 
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.BBox;
@@ -10,16 +21,7 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -50,4 +52,5 @@
 
     @Test
+    @BasicPreferences
     void testNodes() {
         VectorNode node1 = new VectorNode("test");
Index: /trunk/test/unit/org/openstreetmap/josm/gui/autofilter/AutoFilterRuleTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/autofilter/AutoFilterRuleTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/autofilter/AutoFilterRuleTest.java	(revision 18037)
@@ -9,24 +9,17 @@
 import java.util.stream.IntStream;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link AutoFilterRule} class.
  */
+@BasicPreferences
+@I18n
 class AutoFilterRuleTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().i18n();
-
     /**
      * Unit test of {@link AutoFilterRule#getTagValuesForPrimitive}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/bbox/SizeButtonTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/bbox/SizeButtonTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/bbox/SizeButtonTest.java	(revision 18037)
@@ -6,24 +6,15 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.bbox.SizeButton.AccessibleSizeButton;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link SizeButton} class.
  */
+@BasicPreferences
 class SizeButtonTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link SizeButton#SizeButton}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/bugreport/BugReportSettingsPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/bugreport/BugReportSettingsPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/bugreport/BugReportSettingsPanelTest.java	(revision 18037)
@@ -4,10 +4,7 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.bugreport.BugReport;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -15,12 +12,4 @@
  */
 class BugReportSettingsPanelTest {
-
-    /**
-     * Setup test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Test {@link BugReportSettingsPanel}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/bugreport/DebugTextDisplayTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/bugreport/DebugTextDisplayTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/bugreport/DebugTextDisplayTest.java	(revision 18037)
@@ -4,22 +4,14 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit test of {@link DebugTextDisplay} class.
  */
+@BasicPreferences
 class DebugTextDisplayTest {
-    /**
-     * Setup test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test {@link DebugTextDisplay#getCodeText}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/ConflictResolverTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/ConflictResolverTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/ConflictResolverTest.java	(revision 18037)
@@ -7,6 +7,4 @@
 import java.util.NoSuchElementException;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.conflict.Conflict;
@@ -16,20 +14,13 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ConflictResolver} class.
  */
+@BasicPreferences
 class ConflictResolverTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ConflictResolver#buildResolveCommand} - empty case.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModelTest.java	(revision 18037)
@@ -2,8 +2,8 @@
 package org.openstreetmap.josm.gui.conflict.pair.nodes;
 
-import static org.junit.jupiter.api.Assertions.fail;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.beans.PropertyChangeEvent;
@@ -19,6 +19,4 @@
 import javax.swing.DefaultListSelectionModel;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.Node;
@@ -26,23 +24,17 @@
 import org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel;
 import org.openstreetmap.josm.testutils.DatasetFactory;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link NodeListMergeModel}.
  */
+// Needed to due to OSM primitive dependencies
+@BasicPreferences
 class NodeListMergeModelTest {
-
     private final DatasetFactory my = new DatasetFactory();
     private final DatasetFactory their = new DatasetFactory();
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
 
     @SuppressWarnings("unchecked")
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergerTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link NodeListMerger} class.
  */
+@BasicPreferences
 class NodeListMergerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link NodeListMerger#NodeListMerger}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModelTest.java	(revision 18037)
@@ -9,7 +9,4 @@
 import javax.swing.event.ChangeListener;
 
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.conflict.Conflict;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -20,11 +17,14 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link PropertiesMergeModel}.
  */
+// Needed to due to OSM primitive dependencies
+@BasicPreferences
 class PropertiesMergeModelTest {
 
@@ -50,13 +50,6 @@
      * Setup test.
      */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
-    /**
-     * Setup test.
-     */
     @BeforeEach
-    public void setUp() {
+    void setUp() {
         model = new PropertiesMergeModel();
     }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergerTest.java	(revision 18037)
@@ -4,23 +4,14 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link PropertiesMerger} class.
  */
+@BasicPreferences
 class PropertiesMergerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link PropertiesMerger#PropertiesMerger}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMergerTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link RelationMemberMerger} class.
  */
+@BasicPreferences
 class RelationMemberMergerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link RelationMemberMerger#RelationMemberMerger}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java	(revision 18037)
@@ -8,24 +8,15 @@
 import java.awt.Component;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.RelationMember;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link RelationMemberTableCellEditor} class.
  */
+@BasicPreferences
 class RelationMemberTableCellEditorTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link RelationMemberTableCellEditor#RelationMemberTableCellEditor}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRendererTest.java	(revision 18037)
@@ -6,26 +6,17 @@
 import javax.swing.JTable;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.gui.conflict.pair.ListRole;
 import org.openstreetmap.josm.gui.conflict.pair.nodes.NodeListMergeModel;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link RelationMemberTableCellRenderer} class.
  */
+@BasicPreferences
 class RelationMemberTableCellRendererTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link RelationMemberTableCellRenderer#RelationMemberTableCellRenderer}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItemTest.java	(revision 18037)
@@ -6,25 +6,17 @@
 import static org.junit.jupiter.api.Assertions.fail;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link TagMergeItem} class.
  */
+// Needed to due to OSM primitive dependencies
+@BasicPreferences
 class TagMergeItemTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     @Test
     void testTagMergeItem() {
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModelTest.java	(revision 18037)
@@ -9,12 +9,10 @@
 import java.util.Set;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 
 /**
@@ -22,13 +20,7 @@
  */
 @SuppressWarnings("unchecked")
+// Needed to due to OSM primitive dependencies
+@BasicPreferences
 class TagMergeModelTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     protected Set<PropertyChangeListener> getListeners(TagMergeModel model) throws ReflectiveOperationException {
         return (Set<PropertyChangeListener>) TestUtils.getPrivateField(model, "listeners");
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link TagMerger} class.
  */
+@BasicPreferences
 class TagMergerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link TagMerger#TagMerger}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditorTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditorTest.java	(revision 18037)
@@ -4,9 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,12 +10,4 @@
  */
 class MultiValueCellEditorTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link MultiValueCellEditor#MultiValueCellEditor}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRendererTest.java	(revision 18037)
@@ -10,24 +10,15 @@
 import javax.swing.JTable;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.data.osm.TagCollection;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link MultiValueCellRenderer} class.
  */
+@BasicPreferences
 class MultiValueCellRendererTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link MultiValueCellRenderer#MultiValueCellRenderer}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialogTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialogTest.java	(revision 18037)
@@ -9,26 +9,18 @@
 import java.awt.Insets;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.gui.conflict.tags.PasteTagsConflictResolverDialog.StatisticsInfo;
 import org.openstreetmap.josm.gui.conflict.tags.PasteTagsConflictResolverDialog.StatisticsInfoTable;
 import org.openstreetmap.josm.gui.conflict.tags.PasteTagsConflictResolverDialog.StatisticsTableModel;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link PasteTagsConflictResolverDialog} class.
  */
+// Needed to due to OSM primitive dependencies
+@BasicPreferences
 class PasteTagsConflictResolverDialogTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link PasteTagsConflictResolverDialog#PANE_TITLES}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java	(revision 18037)
@@ -10,6 +10,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -18,20 +16,14 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link RelationMemberConflictResolverModel} class.
  */
+// Only needed for OSM primitives
+@BasicPreferences
 class RelationMemberConflictResolverModelTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     List<Way> buildTestDataSet() {
         final DataSet ds = new DataSet();
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link RelationMemberConflictResolver} class.
  */
+@BasicPreferences
 class RelationMemberConflictResolverTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test for {@link RelationMemberConflictResolver#RelationMemberConflictResolver}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java	(revision 18037)
@@ -15,6 +15,4 @@
 import java.util.stream.Collectors;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.data.osm.TagCollection;
@@ -23,19 +21,15 @@
 import org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.AutomaticCombine;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 
 /**
  * Unit tests of {@link TagConflictResolutionUtil} class.
  */
+@BasicPreferences
 class TagConflictResolutionUtilTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static HashSet<String> newHashSet(String... values) {
         return Arrays.stream(values).collect(Collectors.toCollection(HashSet::new));
Index: /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java	(revision 18037)
@@ -17,10 +17,6 @@
 import java.io.IOException;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import net.trajano.commons.testing.UtilityClassTestUtil;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import net.trajano.commons.testing.UtilityClassTestUtil;
 
 /**
@@ -66,11 +62,4 @@
         }
     }
-
-    /**
-     * No dependencies
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferableTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferableTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferableTest.java	(revision 18037)
@@ -4,6 +4,6 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.awt.datatransfer.DataFlavor;
@@ -14,6 +14,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.NodeData;
@@ -21,19 +19,14 @@
 import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData;
 import org.openstreetmap.josm.gui.datatransfer.data.TagTransferData;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link PrimitiveTransferable} class.
  */
+// Only needed for OSM primitives
+@BasicPreferences
 class PrimitiveTransferableTest {
-    /**
-     * Prefs to use OSM primitives
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link PrimitiveTransferable#getTransferDataFlavors()} method response order
Index: /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferableTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferableTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferableTest.java	(revision 18037)
@@ -4,6 +4,7 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
+
 import static org.openstreetmap.josm.gui.datatransfer.RelationMemberTransferable.RELATION_MEMBER_DATA;
 
@@ -13,6 +14,4 @@
 import java.util.Collections;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.PrimitiveData;
@@ -20,7 +19,7 @@
 import org.openstreetmap.josm.data.osm.RelationMemberData;
 import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -28,12 +27,4 @@
  */
 class RelationMemberTransferableTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Test of {@link RelationMemberTransferable#getTransferDataFlavors()} method.
@@ -64,4 +55,5 @@
      */
     @Test
+    @BasicPreferences
     void testGetTransferDataNominal() throws UnsupportedFlavorException {
         RelationMemberTransferable rmt = new RelationMemberTransferable(Collections.singleton(new RelationMember("test", new Node(1))));
Index: /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/TagTransferableTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/TagTransferableTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/TagTransferableTest.java	(revision 18037)
@@ -4,6 +4,6 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.awt.datatransfer.DataFlavor;
@@ -12,10 +12,7 @@
 import java.util.Map;
 
+import org.openstreetmap.josm.gui.datatransfer.data.TagTransferData;
+
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.openstreetmap.josm.gui.datatransfer.data.TagTransferData;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -23,12 +20,4 @@
  */
 class TagTransferableTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Test of {@link TagTransferable#isDataFlavorSupported} method.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferDataTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferDataTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferDataTest.java	(revision 18037)
@@ -9,6 +9,4 @@
 import java.util.Map;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.NodeData;
@@ -18,7 +16,7 @@
 import org.openstreetmap.josm.data.osm.TagCollection;
 import org.openstreetmap.josm.data.osm.WayData;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -26,12 +24,7 @@
  * @author Michael Zangl
  */
+// Only required due to OSM primitive dependencies
+@BasicPreferences
 class PrimitiveTagTransferDataTest {
-    /**
-     * Prefs only required because of the dependencies of OSM primitives.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     private static boolean isHeterogeneousSource(PrimitiveData... t) {
         return new PrimitiveTagTransferData(Arrays.asList(t)).isHeterogeneousSource();
Index: /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/importers/OsmLinkPasterTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/importers/OsmLinkPasterTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/importers/OsmLinkPasterTest.java	(revision 18037)
@@ -5,10 +5,7 @@
 import static org.junit.jupiter.api.Assertions.assertNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.coor.LatLon;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -17,11 +14,4 @@
  */
 class OsmLinkPasterTest {
-    /**
-     * No dependencies
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Test of {@link OsmLinkPaster#parseLatLon(String)}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/NotesDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/NotesDialogTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/NotesDialogTest.java	(revision 18037)
@@ -11,6 +11,4 @@
 import javax.swing.JList;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.notes.Note;
@@ -18,20 +16,13 @@
 import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.gui.dialogs.NotesDialog.NoteRenderer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link NotesDialog}
  */
+@BasicPreferences
 class NotesDialogTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules josmTestRules = new JOSMTestRules().preferences();
-
     private Note createMultiLineNote() {
         Note note = new Note(LatLon.ZERO);
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java	(revision 18037)
@@ -8,12 +8,10 @@
 import java.awt.GraphicsEnvironment;
 import java.awt.event.ActionEvent;
+import java.util.Collections;
+import java.util.List;
+
 import javax.swing.JButton;
 import javax.swing.JDialog;
 
-import java.util.Collections;
-import java.util.List;
-
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.Changeset;
@@ -28,5 +26,5 @@
 import org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager.ShowDetailAction;
 import org.openstreetmap.josm.gui.dialogs.changeset.query.ChangesetQueryDialog;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
 import org.openstreetmap.josm.testutils.mockers.WindowMocker;
@@ -35,19 +33,11 @@
 import mockit.Mock;
 import mockit.MockUp;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChangesetCacheManager} class.
  */
+@BasicPreferences
 class ChangesetCacheManagerTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ChangesetCacheManager#destroyInstance}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableColumnModelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableColumnModelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableColumnModelTest.java	(revision 18037)
@@ -4,9 +4,5 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,12 +10,4 @@
  */
 class ChangesetCacheTableColumnModelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link ChangesetCacheTableColumnModel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanelTest.java	(revision 18037)
@@ -4,9 +4,9 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
 
 /**
@@ -20,5 +20,5 @@
     @RegisterExtension
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
+    public JOSMTestRules test = new JOSMTestRules().preferences().main();
 
     /**
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanelTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link ChangesetDetailPanel} class.
  */
+@BasicPreferences
 class ChangesetDetailPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ChangesetDetailPanel#ChangesetDetailPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanelTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link ChangesetDiscussionPanel} class.
  */
+@BasicPreferences
 class ChangesetDiscussionPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ChangesetDiscussionPanel#ChangesetDiscussionPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanelTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link ChangesetTagsPanel} class.
  */
+@BasicPreferences
 class ChangesetTagsPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ChangesetTagsPanel#ChangesetTagsPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanelTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link AdvancedChangesetQueryPanel} class.
  */
+@BasicPreferences
 class AdvancedChangesetQueryPanelTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link AdvancedChangesetQueryPanel#AdvancedChangesetQueryPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanelTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link BasicChangesetQueryPanel} class.
  */
+@BasicPreferences
 class BasicChangesetQueryPanelTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link BasicChangesetQueryPanel#BasicChangesetQueryPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanelTest.java	(revision 18037)
@@ -5,22 +5,13 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 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;
 
 /**
  * Unit tests of {@link UrlBasedQueryPanel} class.
  */
+@BasicPreferences
 class UrlBasedQueryPanelTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link UrlBasedQueryPanel#UrlBasedQueryPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/DuplicateActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/DuplicateActionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/DuplicateActionTest.java	(revision 18037)
@@ -9,25 +9,18 @@
 import java.io.InputStream;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.io.OsmReader;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link DuplicateAction} class.
  */
+// TMS layer needs prefs. Platform for LayerListDialog shortcuts.
+@BasicPreferences
 class DuplicateActionTest {
-    /**
-     * TMS layer needs prefs. Platform for LayerListDialog shortcuts.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/4539">#4539</a>.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialogTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialogTest.java	(revision 18037)
@@ -7,26 +7,17 @@
 import java.util.List;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link PropertiesDialog} class.
  */
+@BasicPreferences
 class PropertiesDialogTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static String createSearchSetting(List<OsmPrimitive> sel, boolean sameType) {
         return PropertiesDialog.createSearchSetting("foo", sel, sameType).text;
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/RecentTagCollectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/RecentTagCollectionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/RecentTagCollectionTest.java	(revision 18037)
@@ -9,26 +9,17 @@
 import java.util.Collections;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.data.osm.search.SearchParseError;
 import org.openstreetmap.josm.data.osm.search.SearchSetting;
 import org.openstreetmap.josm.data.preferences.ListProperty;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link RecentTagCollection} class.
  */
+@BasicPreferences
 class RecentTagCollectionTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Performs various tests on a {@link RecentTagCollection}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowserTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowserTest.java	(revision 18037)
@@ -4,25 +4,16 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ChildRelationBrowser} class.
  */
+@BasicPreferences
 class ChildRelationBrowserTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ChildRelationBrowser#ChildRelationBrowser}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRendererTest.java	(revision 18037)
@@ -6,24 +6,15 @@
 import javax.swing.JTable;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link MemberTableLinkedCellRenderer} class.
  */
+@BasicPreferences
 class MemberTableLinkedCellRendererTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link MemberTableLinkedCellRenderer#MemberTableLinkedCellRenderer}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableMemberCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableMemberCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableMemberCellRendererTest.java	(revision 18037)
@@ -6,25 +6,16 @@
 import javax.swing.JTable;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link MemberTableMemberCellRenderer} class.
  */
+@BasicPreferences
 class MemberTableMemberCellRendererTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link MemberTableMemberCellRenderer#MemberTableMemberCellRenderer}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModelTest.java	(revision 18037)
@@ -8,26 +8,17 @@
 import java.util.List;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetHandler;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link MemberTableModel} class.
  */
+@BasicPreferences
 class MemberTableModelTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12443">#12443</a>.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableRoleCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableRoleCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/MemberTableRoleCellRendererTest.java	(revision 18037)
@@ -6,24 +6,15 @@
 import javax.swing.JTable;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link MemberTableRoleCellRenderer} class.
  */
+@BasicPreferences
 class MemberTableRoleCellRendererTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link MemberTableRoleCellRenderer#MemberTableRoleCellRenderer}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserTest.java	(revision 18037)
@@ -2,25 +2,16 @@
 package org.openstreetmap.josm.gui.dialogs.relation;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ReferringRelationsBrowser} class.
  */
+@BasicPreferences
 class ReferringRelationsBrowserTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ReferringRelationsBrowser#ReferringRelationsBrowser}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRendererTest.java	(revision 18037)
@@ -6,23 +6,14 @@
 import javax.swing.JTree;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link RelationTreeCellRenderer} class.
  */
+@BasicPreferences
 class RelationTreeCellRendererTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link RelationTreeCellRenderer#RelationTreeCellRenderer}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRendererTest.java	(revision 18037)
@@ -6,23 +6,14 @@
 import javax.swing.JTable;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link SelectionTableCellRenderer} class.
  */
+@BasicPreferences
 class SelectionTableCellRendererTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link SelectionTableCellRenderer#SelectionTableCellRenderer}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java	(revision 18037)
@@ -13,26 +13,17 @@
 import java.util.Set;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.validation.Severity;
 import org.openstreetmap.josm.data.validation.TestError;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ValidatorTreePanel} class.
  */
+@BasicPreferences
 class ValidatorTreePanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ValidatorTreePanel#ValidatorTreePanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/download/BookmarkSelectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/download/BookmarkSelectionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/download/BookmarkSelectionTest.java	(revision 18037)
@@ -2,23 +2,14 @@
 package org.openstreetmap.josm.gui.download;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link BookmarkSelection} class.
  */
+@BasicPreferences
 class BookmarkSelectionTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test for {@link BookmarkSelection#BookmarkSelection}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/download/BoundingBoxSelectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/download/BoundingBoxSelectionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/download/BoundingBoxSelectionTest.java	(revision 18037)
@@ -2,23 +2,14 @@
 package org.openstreetmap.josm.gui.download;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link BoundingBoxSelection} class.
  */
+@BasicPreferences
 class BoundingBoxSelectionTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test for {@link BoundingBoxSelection#BoundingBoxSelection}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/download/PlaceSelectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/download/PlaceSelectionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/download/PlaceSelectionTest.java	(revision 18037)
@@ -2,23 +2,14 @@
 package org.openstreetmap.josm.gui.download;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link PlaceSelection} class.
  */
+@BasicPreferences
 class PlaceSelectionTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test for {@link PlaceSelection#PlaceSelection}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/download/TileSelectionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/download/TileSelectionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/download/TileSelectionTest.java	(revision 18037)
@@ -2,23 +2,14 @@
 package org.openstreetmap.josm.gui.download;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link TileSelection} class.
  */
+@BasicPreferences
 class TileSelectionTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test for {@link TileSelection#TileSelection}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/help/HyperlinkHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/help/HyperlinkHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/help/HyperlinkHandlerTest.java	(revision 18037)
@@ -11,23 +11,14 @@
 import javax.swing.text.html.HTMLEditorKit;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.gui.widgets.JosmEditorPane;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.gui.widgets.JosmEditorPane;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link HyperlinkHandler} class.
  */
+@BasicPreferences
 class HyperlinkHandlerTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/17338">#17338</a>.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/history/CoordinateInfoViewerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/history/CoordinateInfoViewerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/history/CoordinateInfoViewerTest.java	(revision 18037)
@@ -5,22 +5,13 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 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;
 
 /**
  * Unit tests of {@link CoordinateInfoViewer} class.
  */
+@BasicPreferences
 class CoordinateInfoViewerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test for {@link CoordinateInfoViewer#CoordinateInfoViewer} - {@code null} handling.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/history/NodeListViewerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/history/NodeListViewerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/history/NodeListViewerTest.java	(revision 18037)
@@ -5,22 +5,13 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 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;
 
 /**
  * Unit tests of {@link NodeListViewer} class.
  */
+@BasicPreferences
 class NodeListViewerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test for {@link NodeListViewer#NodeListViewer} - {@code null} handling.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanelTest.java	(revision 18037)
@@ -4,22 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link BasicUploadSettingsPanel} class.
  */
+@BasicPreferences
 class BasicUploadSettingsPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link BasicUploadSettingsPanel#BasicUploadSettingsPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetCellRendererTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetCellRendererTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetCellRendererTest.java	(revision 18037)
@@ -6,10 +6,7 @@
 import javax.swing.JList;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Changeset;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import java.time.Instant;
@@ -18,12 +15,6 @@
  * Unit tests of {@link ChangesetCellRenderer} class.
  */
+@BasicPreferences
 class ChangesetCellRendererTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link ChangesetCellRenderer} class.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetManagementPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetManagementPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/ChangesetManagementPanelTest.java	(revision 18037)
@@ -4,22 +4,12 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ChangesetManagementPanel} class.
  */
+@BasicPreferences
 class ChangesetManagementPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link ChangesetManagementPanel#ChangesetManagementPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/CredentialDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/CredentialDialogTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/CredentialDialogTest.java	(revision 18037)
@@ -7,23 +7,13 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.io.CredentialDialog.CredentialPanel;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link CredentialDialog} class.
  */
+@BasicPreferences
 class CredentialDialogTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link CredentialDialog.CredentialPanel} class.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/CustomConfiguratorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/CustomConfiguratorTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/CustomConfiguratorTest.java	(revision 18037)
@@ -14,26 +14,16 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.PreferencesUtils;
 import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Utils;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests for class {@link CustomConfigurator}.
  */
+@BasicPreferences
 class CustomConfiguratorTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test method for {@link CustomConfigurator#exportPreferencesKeysToFile}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCellTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCellTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCellTest.java	(revision 18037)
@@ -10,24 +10,15 @@
 import javax.swing.JTable;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link LayerNameAndFilePathTableCell} class.
  */
+@BasicPreferences
 class LayerNameAndFilePathTableCellTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link LayerNameAndFilePathTableCell} class.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 18037)
@@ -18,5 +18,4 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -24,21 +23,12 @@
 import org.openstreetmap.josm.io.UploadStrategySpecification;
 import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.testutils.mockers.WindowMocker;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link UploadDialog} class.
  */
+@BasicPreferences
 class UploadDialogTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     private static class MockUploadDialog extends JOptionPane implements IUploadDialog {
         private final String source;
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanelTest.java	(revision 18037)
@@ -4,22 +4,12 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link UploadParameterSummaryPanel} class.
  */
+@BasicPreferences
 class UploadParameterSummaryPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link UploadParameterSummaryPanel#UploadParameterSummaryPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadTextComponentValidatorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadTextComponentValidatorTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/io/UploadTextComponentValidatorTest.java	(revision 18037)
@@ -8,19 +8,9 @@
 import javax.swing.JTextField;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
+@BasicPreferences
 class UploadTextComponentValidatorTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link UploadTextComponentValidator.UploadCommentValidator}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/ImageryLayerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/ImageryLayerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/ImageryLayerTest.java	(revision 18037)
@@ -5,23 +5,13 @@
 import static org.junit.jupiter.api.Assertions.assertSame;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.layer.imagery.ImageryFilterSettings;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ImageryLayer} class.
  */
+@BasicPreferences
 class ImageryLayerTest {
-
-    /**
-     * For creating layers
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ImageryLayer#getFilterSettings()}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayerTest.java	(revision 18037)
@@ -4,22 +4,16 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link GeoImageLayer} class.
  */
+// Basic preferences are needed for OSM primitives
+@BasicPreferences
 class GeoImageLayerTest {
-    /**
-     * We need prefs for this.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplayTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplayTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplayTest.java	(revision 18037)
@@ -14,23 +14,14 @@
 
 import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay.VisRect;
 import org.openstreetmap.josm.gui.layer.imagery.ImageryFilterSettings;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ImageDisplay} class.
  */
+@BasicPreferences
 class ImageDisplayTest {
-    /**
-     * We need prefs for this.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ImageDisplay#calculateDrawImageRectangle}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoaderTest.java	(revision 18037)
@@ -2,9 +2,7 @@
 package org.openstreetmap.josm.gui.layer.geoimage;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 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 org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.StreamUtils;
 
@@ -22,12 +20,6 @@
  * Unit tests of {@link ThumbsLoader} class.
  */
+@BasicPreferences
 class ThumbsLoaderTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Performance test for {@link ThumbsLoader}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoaderTest.java	(revision 18037)
@@ -11,25 +11,15 @@
 import java.util.List;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import com.github.tomakehurst.wiremock.WireMockServer;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit test of {@link WikimediaCommonsLoader}
  */
+@BasicPreferences
 class WikimediaCommonsLoaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link WikimediaCommonsLoader}
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java	(revision 18037)
@@ -8,5 +8,4 @@
 import java.util.Collections;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
@@ -17,21 +16,12 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.io.GpxReaderTest;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link DownloadAlongTrackAction} class.
  */
+@BasicPreferences
 class DownloadAlongTrackActionTest {
-
-    /**
-     * The test rules for this test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     private static PleaseWaitRunnable createTask(String file) throws Exception {
         // click "Download" when presented with the appropriate HelpAwareOptionPane
Index: /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java	(revision 18037)
@@ -5,11 +5,9 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition.Context;
 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.Op;
 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.PseudoClasses;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import net.trajano.commons.testing.UtilityClassTestUtil;
 
@@ -20,13 +18,6 @@
  * Unit tests of {@link ConditionFactory}.
  */
+@BasicPreferences
 class ConditionFactoryTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/14368">#14368</a>.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionTest.java	(revision 18037)
@@ -8,5 +8,4 @@
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmUtils;
@@ -16,7 +15,5 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.Op;
 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.SimpleKeyValueCondition;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
@@ -24,11 +21,7 @@
  * @author Michael Zangl
  */
+// We need prefs for nodes
+@BasicPreferences
 class ConditionTest {
-    /**
-     * We need prefs for nodes.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
     private OsmPrimitive node0;
     private OsmPrimitive node1;
Index: /trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUITest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUITest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUITest.java	(revision 18037)
@@ -4,23 +4,14 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link FullyAutomaticAuthorizationUI} class.
  */
+@BasicPreferences
 class FullyAutomaticAuthorizationUITest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link FullyAutomaticAuthorizationUI#FullyAutomaticAuthorizationUI}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanelTest.java	(revision 18037)
@@ -4,22 +4,12 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link FullyAutomaticPropertiesPanel} class.
  */
+@BasicPreferences
 class FullyAutomaticPropertiesPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link FullyAutomaticPropertiesPanel#FullyAutomaticPropertiesPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUITest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUITest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUITest.java	(revision 18037)
@@ -4,23 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ManualAuthorizationUI} class.
  */
+@BasicPreferences
 class ManualAuthorizationUITest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ManualAuthorizationUI#ManualAuthorizationUI}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUITest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUITest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUITest.java	(revision 18037)
@@ -4,23 +4,13 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link SemiAutomaticAuthorizationUI} class.
  */
+@BasicPreferences
 class SemiAutomaticAuthorizationUITest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link SemiAutomaticAuthorizationUI#SemiAutomaticAuthorizationUI}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanelTest.java	(revision 18037)
@@ -5,22 +5,14 @@
 import static org.junit.jupiter.api.Assertions.assertFalse;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link AddTMSLayerPanel} class.
  */
+@BasicPreferences
 class AddTMSLayerPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link AddTMSLayerPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java	(revision 18037)
@@ -4,22 +4,14 @@
 import static org.junit.jupiter.api.Assertions.assertFalse;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link AddWMSLayerPanel} class.
  */
+@BasicPreferences
 class AddWMSLayerPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link AddWMSLayerPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanelTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanelTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanelTest.java	(revision 18037)
@@ -5,22 +5,13 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 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;
 
 /**
  * Unit tests of {@link AddWMTSLayerPanel} class.
  */
+@BasicPreferences
 class AddWMTSLayerPanelTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link AddWMTSLayerPanel}.
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java	(revision 18037)
@@ -2,25 +2,16 @@
 package org.openstreetmap.josm.gui.preferences.server;
 
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ProxyPreference} class.
  */
+@BasicPreferences
 class ProxyPreferenceTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ProxyPreference#ProxyPreference}.
@@ -36,5 +27,5 @@
     @Test
     void testAddGui() {
-        PreferencesTestUtils.doTestPreferenceSettingAddGui(new ProxyPreference.Factory(), null);
+        assertDoesNotThrow(() -> PreferencesTestUtils.doTestPreferenceSettingAddGui(new ProxyPreference.Factory(), null));
     }
 }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java	(revision 18037)
@@ -2,25 +2,18 @@
 package org.openstreetmap.josm.gui.preferences.server;
 
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+
+import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link ServerAccessPreference} class.
  */
+@BasicPreferences
 class ServerAccessPreferenceTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link ServerAccessPreference#ServerAccessPreference}.
@@ -36,5 +29,5 @@
     @Test
     void testAddGui() {
-        PreferencesTestUtils.doTestPreferenceSettingAddGui(new ServerAccessPreference.Factory(), null);
+        assertDoesNotThrow(() -> PreferencesTestUtils.doTestPreferenceSettingAddGui(new ServerAccessPreference.Factory(), null));
     }
 }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetTest.java	(revision 18037)
@@ -2,5 +2,9 @@
 package org.openstreetmap.josm.gui.tagging.presets;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.EnumSet;
+
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -8,11 +12,9 @@
 import org.openstreetmap.josm.data.osm.OsmUtils;
 import org.openstreetmap.josm.data.osm.search.SearchCompiler;
+import org.openstreetmap.josm.data.osm.search.SearchParseError;
 import org.openstreetmap.josm.gui.tagging.presets.items.Key;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
-import java.util.EnumSet;
-
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -30,7 +32,8 @@
     /**
      * Tests {@link TaggingPreset#test(IPrimitive)}
+     * @throws SearchParseError never
      */
     @Test
-    void test() throws Exception {
+    void test() throws SearchParseError {
         Key key = new Key();
         key.key = "railway";
Index: /trunk/test/unit/org/openstreetmap/josm/gui/util/WindowGeometryTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/util/WindowGeometryTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/util/WindowGeometryTest.java	(revision 18037)
@@ -16,25 +16,20 @@
 
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.util.WindowGeometry.WindowGeometryException;
 import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 import nl.jqno.equalsverifier.Warning;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.NullSource;
+import org.junit.jupiter.params.provider.ValueSource;
 
 /**
  * Unit tests of {@link WindowGeometry} class.
  */
+@BasicPreferences
 class WindowGeometryTest {
-    /**
-     * Some of this depends on preferences.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link WindowGeometry#centerInWindow} method.
@@ -62,34 +57,9 @@
      * Test of {@link WindowGeometry.WindowGeometryException} class.
      */
-    @Test
-    void testWindowGeometryException1() {
-        Config.getPref().put("test", null);
-        assertThrows(WindowGeometryException.class, () -> new WindowGeometry("test"));
-    }
-
-    /**
-     * Test of {@link WindowGeometry.WindowGeometryException} class.
-     */
-    @Test
-    void testWindowGeometryException2() {
-        Config.getPref().put("test", "");
-        assertThrows(WindowGeometryException.class, () -> new WindowGeometry("test"));
-    }
-
-    /**
-     * Test of {@link WindowGeometry.WindowGeometryException} class.
-     */
-    @Test
-    void testWindowGeometryException3() {
-        Config.getPref().put("test", "x=not_a_number");
-        assertThrows(WindowGeometryException.class, () -> new WindowGeometry("test"));
-    }
-
-    /**
-     * Test of {@link WindowGeometry.WindowGeometryException} class.
-     */
-    @Test
-    void testWindowGeometryException4() {
-        Config.getPref().put("test", "wrong_pattern");
+    @ParameterizedTest
+    @NullSource
+    @ValueSource(strings = {"", "x=not_a_number", "wrong_pattern"})
+    void testWindowGeometryException(String badValue) {
+        Config.getPref().put("test", badValue);
         assertThrows(WindowGeometryException.class, () -> new WindowGeometry("test"));
     }
@@ -100,5 +70,5 @@
      */
     @Test
-    void testWindowGeometryException5() throws WindowGeometryException {
+    void testWindowGeometryExceptionNoThrow() throws WindowGeometryException {
         Config.getPref().put("test", "x=15,y=55,width=200,height=100");
         assertNotNull(new WindowGeometry("test"));
Index: /trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java	(revision 18037)
@@ -2,23 +2,14 @@
 package org.openstreetmap.josm.io;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import net.trajano.commons.testing.UtilityClassTestUtil;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import net.trajano.commons.testing.UtilityClassTestUtil;
 
 /**
  * Unit tests of {@link CertificateAmendment} class.
  */
+@BasicPreferences
 class CertificateAmendmentTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Tests that {@code CertificateAmendment} satisfies utility class criteria.
Index: /trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryTest.java	(revision 18037)
@@ -2,8 +2,6 @@
 package org.openstreetmap.josm.io;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import java.time.Instant;
@@ -16,13 +14,6 @@
  * Unit tests of {@link ChangesetQuery}
  */
+@BasicPreferences
 class ChangesetQueryTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit tests of {@link ChangesetQuery#getQueryString()}
Index: /trunk/test/unit/org/openstreetmap/josm/io/DiffResultProcessorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/DiffResultProcessorTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/DiffResultProcessorTest.java	(revision 18037)
@@ -10,6 +10,4 @@
 import java.util.Set;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Changeset;
@@ -22,22 +20,15 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.io.DiffResultProcessor.DiffResultEntry;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.XmlParsingException;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link DiffResultProcessor}
  */
+@BasicPreferences
 class DiffResultProcessorTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static void shouldFail(String s) {
         try {
Index: /trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java	(revision 18037)
@@ -19,6 +19,4 @@
 import java.util.stream.IntStream;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -27,17 +25,13 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link GeoJSONReader}.
  */
+@BasicPreferences
 class GeoJSONReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    public JOSMTestRules rules = new JOSMTestRules();
-
     /**
      * Test reading a GeoJSON file.
Index: /trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java	(revision 18037)
@@ -3,6 +3,6 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.ByteArrayInputStream;
@@ -15,6 +15,4 @@
 import java.util.Map;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.Bounds;
@@ -22,21 +20,14 @@
 import org.openstreetmap.josm.data.gpx.GpxData;
 import org.openstreetmap.josm.data.gpx.WayPoint;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 import org.xml.sax.SAXException;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Tests the {@link GpxReader}.
  */
+@BasicPreferences
 public class GpxReaderTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Parses a GPX file and returns the parsed data
Index: /trunk/test/unit/org/openstreetmap/josm/io/GpxWriterTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/GpxWriterTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/GpxWriterTest.java	(revision 18037)
@@ -15,6 +15,4 @@
 import java.util.function.Consumer;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.gpx.GpxConstants;
@@ -25,20 +23,13 @@
 import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
 import org.openstreetmap.josm.data.gpx.WayPoint;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests the {@link GpxWriter}.
  */
+@BasicPreferences
 public class GpxWriterTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static void testSingleWaypoint(Consumer<WayPoint> consumer, String atts) throws IOException {
         GpxData gpx = new GpxData();
Index: /trunk/test/unit/org/openstreetmap/josm/io/MultiFetchOverpassObjectReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/MultiFetchOverpassObjectReaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/MultiFetchOverpassObjectReaderTest.java	(revision 18037)
@@ -7,5 +7,4 @@
 import java.util.List;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Node;
@@ -13,20 +12,11 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link MultiFetchOverpassObjectReader}.
  */
+@BasicPreferences
 class MultiFetchOverpassObjectReaderTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test {@link MultiFetchOverpassObjectReader#buildRequestString}
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmApiExceptionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmApiExceptionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmApiExceptionTest.java	(revision 18037)
@@ -5,22 +5,12 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link OsmApiException} class.
  */
+@BasicPreferences
 class OsmApiExceptionTest {
-
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17328">Bug #17328</a>.
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmChangeBuilderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmChangeBuilderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmChangeBuilderTest.java	(revision 18037)
@@ -7,26 +7,17 @@
 import java.util.Arrays;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Changeset;
 import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link OsmChangeBuilder}
  */
+@BasicPreferences
 class OsmChangeBuilderTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static void shouldFail(Runnable r) {
         try {
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmChangeReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmChangeReaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmChangeReaderTest.java	(revision 18037)
@@ -10,6 +10,4 @@
 import java.util.Iterator;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.notes.Note;
@@ -17,21 +15,14 @@
 import org.openstreetmap.josm.data.osm.NoteData;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Pair;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link OsmChangeReader}.
  */
+@BasicPreferences
 class OsmChangeReaderTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Parse osmChange.
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.java	(revision 18037)
@@ -12,6 +12,4 @@
 import java.util.Arrays;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.ChangesetDataSet;
 import org.openstreetmap.josm.data.osm.ChangesetDataSet.ChangesetModificationType;
@@ -22,22 +20,16 @@
 import org.openstreetmap.josm.data.osm.history.HistoryWay;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.XmlParsingException;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link OsmChangesetContentParser}.
  */
+@BasicPreferences
 class OsmChangesetContentParserTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static void shouldFail(Runnable r) {
         try {
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetParserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetParserTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmChangesetParserTest.java	(revision 18037)
@@ -9,15 +9,13 @@
 import java.util.List;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.Changeset;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link OsmChangesetParser} class.
  */
+@BasicPreferences
 class OsmChangesetParserTest {
 
@@ -55,11 +53,4 @@
         "</osm>";
 
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     private static List<Changeset> parse(String cs) throws IllegalDataException {
         return OsmChangesetParser.parse(new ByteArrayInputStream(cs.getBytes(StandardCharsets.UTF_8)), NullProgressMonitor.INSTANCE);
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java	(revision 18037)
@@ -12,6 +12,4 @@
 import java.util.Iterator;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -21,20 +19,13 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link OsmReader} class.
  */
+@BasicPreferences
 class OsmJsonReaderTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Parse JSON.
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmReaderTest.java	(revision 18037)
@@ -18,6 +18,4 @@
 import java.util.Arrays;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -27,20 +25,13 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.io.OsmReader.Options;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link OsmReader} class.
  */
+@BasicPreferences
 class OsmReaderTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static Options[][] options() {
         return new Options[][]{
Index: /trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java	(revision 18037)
@@ -17,7 +17,4 @@
 import java.util.List;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Changeset;
@@ -29,18 +26,13 @@
 import org.openstreetmap.josm.data.osm.UploadPolicy;
 import org.openstreetmap.josm.data.osm.User;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link OsmWriter} class.
  */
+@BasicPreferences
 class OsmWriterTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link OsmWriter#byIdComparator}.
Index: /trunk/test/unit/org/openstreetmap/josm/io/ParseWithChangesetReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/ParseWithChangesetReaderTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/ParseWithChangesetReaderTest.java	(revision 18037)
@@ -11,27 +11,18 @@
 import java.nio.charset.StandardCharsets;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.tools.Logging;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Additional unit tests for {@link OsmReader}.
  */
+@BasicPreferences
 class ParseWithChangesetReaderTest {
-
-    /**
-     * Setup rule
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static DataSet getDataSet(String doc) throws IOException, IllegalDataException {
         try (InputStream is = new ByteArrayInputStream(doc.getBytes(StandardCharsets.UTF_8))) {
Index: /trunk/test/unit/org/openstreetmap/josm/io/auth/CredentialsAgentExceptionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/auth/CredentialsAgentExceptionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/auth/CredentialsAgentExceptionTest.java	(revision 18037)
@@ -4,9 +4,5 @@
 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.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,12 +10,4 @@
  */
 class CredentialsAgentExceptionTest {
-
-    /**
-     * Setup test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@code CredentialsAgentException#CredentialsAgentException}
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/AddTagsDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/AddTagsDialogTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/AddTagsDialogTest.java	(revision 18037)
@@ -6,21 +6,12 @@
 import java.util.Map;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests for class {@link AddTagsDialog}.
  */
+@BasicPreferences
 class AddTagsDialogTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of {@link AddTagsDialog#parseUrlTagsToKeyValues}
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandlerTest.java	(revision 18037)
@@ -6,25 +6,17 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link AddWayHandler} class.
  */
+@BasicPreferences
 class AddWayHandlerTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static AddWayHandler newHandler(String url) throws RequestHandlerBadRequestException {
         AddWayHandler req = new AddWayHandler();
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java	(revision 18037)
@@ -4,6 +4,6 @@
 import static org.hamcrest.CoreMatchers.hasItem;
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
@@ -11,23 +11,15 @@
 import java.util.List;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link ImageryHandler} class.
  */
+@BasicPreferences
 class ImageryHandlerTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static ImageryHandler newHandler(String url) throws RequestHandlerBadRequestException {
         ImageryHandler req = new ImageryHandler();
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandlerTest.java	(revision 18037)
@@ -6,10 +6,8 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -17,11 +15,4 @@
  */
 class LoadAndZoomHandlerTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static LoadAndZoomHandler newHandler(String url) throws RequestHandlerBadRequestException {
         LoadAndZoomHandler req = new LoadAndZoomHandler();
@@ -66,4 +57,5 @@
      */
     @Test
+    @BasicPreferences
     void testNominalRequest() throws Exception {
         assertDoesNotThrow(() -> newHandler("https://localhost?bottom=0&top=0&left=1&right=1").handle());
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandlerTest.java	(revision 18037)
@@ -9,14 +9,11 @@
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;
 import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 import com.github.tomakehurst.wiremock.WireMockServer;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -24,11 +21,4 @@
  */
 class LoadObjectHandlerTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     private static LoadObjectHandler newHandler(String url) throws RequestHandlerBadRequestException {
         LoadObjectHandler req = new LoadObjectHandler();
@@ -69,4 +59,5 @@
      */
     @Test
+    @BasicPreferences
     void testNominalRequest() {
         WireMockServer wiremock = TestUtils.getWireMockServer();
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java	(revision 18037)
@@ -9,11 +9,8 @@
 import java.util.Map;
 
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault;
 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -21,12 +18,4 @@
  */
 class RequestHandlerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     Map<String, String> getRequestParameter(String url) throws RequestHandlerBadRequestException {
         final RequestHandler req = new RequestHandler() {
Index: /trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java	(revision 18037)
@@ -4,9 +4,5 @@
 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.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,12 +10,4 @@
  */
 class PluginDownloadExceptionTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link PluginDownloadException#PluginDownloadException}.
Index: /trunk/test/unit/org/openstreetmap/josm/plugins/PluginExceptionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/plugins/PluginExceptionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/plugins/PluginExceptionTest.java	(revision 18037)
@@ -4,9 +4,5 @@
 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.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,12 +10,4 @@
  */
 class PluginExceptionTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link PluginException#PluginException}.
Index: /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java	(revision 18037)
@@ -17,6 +17,4 @@
 import javax.swing.JScrollPane;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.MainApplication;
@@ -25,23 +23,16 @@
 import org.openstreetmap.josm.plugins.PluginHandler.DeprecatedPlugin;
 import org.openstreetmap.josm.plugins.PluginHandler.PluginInformationAction;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
 import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests of {@link PluginHandler} class.
  */
+@BasicPreferences
 class PluginHandlerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of methods {@link DeprecatedPlugin#equals} and {@link DeprecatedPlugin#hashCode}.
Index: /trunk/test/unit/org/openstreetmap/josm/plugins/PluginListParseExceptionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/plugins/PluginListParseExceptionTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/plugins/PluginListParseExceptionTest.java	(revision 18037)
@@ -4,9 +4,5 @@
 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.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,12 +10,4 @@
  */
 class PluginListParseExceptionTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test of {@link PluginListParseException#PluginListParseException}.
Index: /trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java	(revision 18037)
@@ -2,10 +2,8 @@
 package org.openstreetmap.josm.spi.preferences;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 
@@ -13,12 +11,7 @@
  * Test {@link ListListSetting}.
  */
+// This is a preference test
+@BasicPreferences
 class ListListSettingTest {
-    /**
-     * This is a preference test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of methods {@link ListListSetting#equals} and {@link ListListSetting#hashCode}.
Index: /trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java	(revision 18037)
@@ -2,10 +2,8 @@
 package org.openstreetmap.josm.spi.preferences;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 
@@ -13,12 +11,7 @@
  * Test {@link ListSetting}.
  */
+// This is a preference test
+@BasicPreferences
 class ListSettingTest {
-    /**
-     * This is a preference test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of methods {@link ListSetting#equals} and {@link ListSetting#hashCode}.
Index: /trunk/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java	(revision 18037)
@@ -2,10 +2,8 @@
 package org.openstreetmap.josm.spi.preferences;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 
@@ -13,12 +11,7 @@
  * Test {@link MapListSetting}.
  */
+// This is a preference test
+@BasicPreferences
 class MapListSettingTest {
-    /**
-     * This is a preference test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of methods {@link MapListSetting#equals} and {@link MapListSetting#hashCode}.
Index: /trunk/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java	(revision 18037)
@@ -2,10 +2,8 @@
 package org.openstreetmap.josm.spi.preferences;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 
@@ -13,12 +11,7 @@
  * Test {@link StringSetting}.
  */
+// This is a preference test
+@BasicPreferences
 class StringSettingTest {
-    /**
-     * This is a preference test
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Unit test of methods {@link StringSetting#equals} and {@link StringSetting#hashCode}.
Index: /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/AnnotationUtils.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/AnnotationUtils.java	(revision 18037)
+++ /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/AnnotationUtils.java	(revision 18037)
@@ -0,0 +1,82 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.testutils.annotations;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Collection;
+import java.util.Optional;
+
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.platform.commons.support.AnnotationSupport;
+
+/**
+ * Useful methods for annotation extensions
+ * @author Taylor Smock
+ * @since 18037
+ */
+final class AnnotationUtils {
+    private AnnotationUtils() {
+        // Utils class
+    }
+
+    /**
+     * Find the first parent annotation
+     * @param <T> The annotation to find
+     * @param context The context to search
+     * @param annotation The annotation to find
+     * @return See {@link AnnotationSupport#findAnnotation}
+     */
+    public static <T extends Annotation> Optional<T> findFirstParentAnnotation(ExtensionContext context, Class<T> annotation) {
+        ExtensionContext current = context;
+        do {
+            Optional<T> foundAnnotation = AnnotationSupport.findAnnotation(current.getElement(), annotation);
+            if (foundAnnotation.isPresent()) {
+                return foundAnnotation;
+            }
+            current = current.getParent().orElse(null);
+        } while (current != null);
+        return Optional.empty();
+    }
+
+    /**
+     * Reset a static class (all static fields are unset). If they are initialized as part of a static block, please be aware of NPEs.
+     * @param clazz The class to reset
+     * @throws ReflectiveOperationException If reflection doesn't work, for whatever reason.
+     */
+    public static void resetStaticClass(Class<?> clazz) throws ReflectiveOperationException {
+        for (Field field : clazz.getDeclaredFields()) {
+            if (!field.isAccessible()) {
+                field.setAccessible(true);
+            }
+            // Don't reset fields that are not static
+            if ((field.getModifiers() & Modifier.STATIC) == 0) {
+                continue;
+            }
+            final boolean isFinal = (field.getModifiers() & Modifier.FINAL) != 0;
+            if (field.get(null) instanceof Collection && isFinal) {
+                // Clear all collections (assume they start empty)
+                try {
+                    ((Collection<?>) field.get(null)).clear();
+                } catch (UnsupportedOperationException e) {
+                    // Probably an unmodifiable collection
+                }
+            } else if (!isFinal) {
+                // Only reset static fields, but not final static fields
+                field.set(null, null);
+            }
+        }
+    }
+
+    /**
+     * Check if the element is annotated with the
+     * @param annotatedElement The annotated element wrapped in an optional.
+     * @param annotationClass The annotation class
+     * @param <T> Annotation class type
+     * @return {@code true} if the element is present and is annotated with the specified class
+     */
+    public static <T extends Annotation> boolean elementIsAnnotated(Optional<AnnotatedElement> annotatedElement, Class<T> annotationClass) {
+        return annotatedElement.isPresent() && annotatedElement.get().isAnnotationPresent(annotationClass);
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/BasicPreferences.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/BasicPreferences.java	(revision 18037)
+++ /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/BasicPreferences.java	(revision 18037)
@@ -0,0 +1,76 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.testutils.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.junit.jupiter.api.extension.AfterAllCallback;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
+import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.data.preferences.JosmBaseDirectories;
+import org.openstreetmap.josm.data.preferences.JosmUrls;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+/**
+ * Allow tests to use JOSM preferences (see {@link JOSMTestRules#preferences()}).
+ * This is often enough for basic tests.
+ *
+ * @author Taylor Smock
+ * @see FullPreferences
+ * @since 18037
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.METHOD})
+@ExtendWith(BasicPreferences.BasicPreferencesExtension.class)
+public @interface BasicPreferences {
+
+    /**
+     * Initialize basic preferences. This is often more than enough for basic tests.
+     * @author Taylor Smock
+     */
+    class BasicPreferencesExtension implements AfterAllCallback, AfterEachCallback, BeforeAllCallback, BeforeEachCallback {
+        @Override
+        public void afterAll(ExtensionContext context) throws Exception {
+            AnnotationUtils.resetStaticClass(Config.class);
+        }
+
+        @Override
+        public void afterEach(ExtensionContext context) throws Exception {
+            if (context.getElement().isPresent() && context.getElement().get().isAnnotationPresent(BasicPreferences.class)) {
+                this.afterAll(context);
+            }
+        }
+
+        @Override
+        public void beforeAll(ExtensionContext context) throws Exception {
+            Preferences pref = Preferences.main();
+            // Disable saving on put, just to avoid overwriting pref files
+            pref.enableSaveOnPut(false);
+            Config.setPreferencesInstance(pref);
+            Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance());
+            Config.setUrlsProvider(JosmUrls.getInstance());
+            // Force an invalid URL just to avoid accidents
+            Config.getPref().put("osm-server.url", "http://invalid");
+
+            // Store the pref for other extensions
+            context.getStore(Namespace.create(BasicPreferencesExtension.class)).put("preferences", pref);
+        }
+
+        @Override
+        public void beforeEach(ExtensionContext context) throws Exception {
+            if (AnnotationUtils.elementIsAnnotated(context.getElement(), BasicPreferences.class) || Config.getPref() == null) {
+                this.beforeAll(context);
+            }
+        }
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/FullPreferences.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/FullPreferences.java	(revision 18037)
+++ /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/FullPreferences.java	(revision 18037)
@@ -0,0 +1,60 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.testutils.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Map;
+
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.spi.preferences.Setting;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences.BasicPreferencesExtension;
+
+/**
+ * Allow tests to use JOSM preferences with default values (see {@link JOSMTestRules#preferences()})
+ * @author Taylor Smock
+ * @see BasicPreferences (often enough for simple tests).
+ * @since 18037
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE, ElementType.METHOD})
+@JosmHome
+@BasicPreferences
+@ExtendWith(FullPreferences.UsePreferencesExtension.class)
+public @interface FullPreferences {
+    /**
+     * Initialize preferences.
+     */
+    class UsePreferencesExtension implements BeforeAllCallback, BeforeEachCallback {
+        @Override
+        public void beforeAll(ExtensionContext context) throws Exception {
+            Preferences pref = context.getStore(Namespace.create(BasicPreferencesExtension.class)).get("preferences", Preferences.class);
+            @SuppressWarnings("unchecked")
+            final Map<String, Setting<?>> defaultsMap = (Map<String, Setting<?>>) TestUtils.getPrivateField(pref, "defaultsMap");
+            defaultsMap.clear();
+            pref.resetToInitialState();
+            pref.enableSaveOnPut(false);
+            // No pref init -> that would only create the preferences file.
+            // We force the use of a wrong API server, just in case anyone attempts an upload
+            Config.getPref().put("osm-server.url", "http://invalid");
+        }
+
+        @Override
+        public void beforeEach(ExtensionContext context) throws Exception {
+            if (AnnotationUtils.elementIsAnnotated(context.getElement(), FullPreferences.class)) {
+                this.beforeAll(context);
+            }
+        }
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/I18n.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/I18n.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/I18n.java	(revision 18037)
@@ -1,4 +1,10 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.testutils.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
 import org.junit.jupiter.api.extension.AfterEachCallback;
@@ -8,14 +14,9 @@
 import org.junit.platform.commons.support.AnnotationSupport;
 
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
 /**
  * Enables the i18n module for this test.
  * @author Taylor Smock
  * @see org.openstreetmap.josm.testutils.JOSMTestRules#i18n(String)
+ * @since 17914
  */
 @Documented
Index: /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/JosmHome.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/JosmHome.java	(revision 18037)
+++ /trunk/test/unit/org/openstreetmap/josm/testutils/annotations/JosmHome.java	(revision 18037)
@@ -0,0 +1,70 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.testutils.annotations;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.UUID;
+
+import org.junit.jupiter.api.extension.AfterAllCallback;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
+import org.openstreetmap.josm.data.preferences.JosmBaseDirectories;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+/**
+ * Use the JOSM home directory. See {@link JOSMTestRules}.
+ * Typically only used by {@link FullPreferences}.
+ *
+ * @author Taylor Smock
+ * @since 18037
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@ExtendWith(JosmHome.JosmHomeExtension.class)
+public @interface JosmHome {
+    /**
+     * Create a JOSM home directory. Prefer using {@link JosmHome}.
+     * @author Taylor Smock
+     */
+    class JosmHomeExtension implements BeforeAllCallback, AfterAllCallback {
+        @Override
+        public void afterAll(ExtensionContext context) throws Exception {
+            Path tempDir = context.getStore(Namespace.create(JosmHome.class)).get("home", Path.class);
+            Files.walkFileTree(tempDir, new SimpleFileVisitor<Path>() {
+                @Override
+                public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
+                    Files.delete(dir);
+                    return FileVisitResult.CONTINUE;
+                }
+
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.delete(file);
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        }
+
+        @Override
+        public void beforeAll(ExtensionContext context) throws Exception {
+            Path tempDir = Files.createTempDirectory(UUID.randomUUID().toString());
+            context.getStore(Namespace.create(JosmHome.class)).put("home", tempDir);
+            File home = tempDir.toFile();
+            System.setProperty("josm.home", home.getAbsolutePath());
+            JosmBaseDirectories.getInstance().clearMemos();
+        }
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/tools/CheckParameterUtilTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/CheckParameterUtilTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/CheckParameterUtilTest.java	(revision 18037)
@@ -2,10 +2,6 @@
 package org.openstreetmap.josm.tools;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import net.trajano.commons.testing.UtilityClassTestUtil;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import net.trajano.commons.testing.UtilityClassTestUtil;
 
 /**
@@ -13,12 +9,4 @@
  */
 class CheckParameterUtilTest {
-
-    /**
-     * Setup rule.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Tests that {@code CheckParameterUtil} satisfies utility class criteria.
Index: /trunk/test/unit/org/openstreetmap/josm/tools/FontsManagerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/FontsManagerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/FontsManagerTest.java	(revision 18037)
@@ -7,10 +7,6 @@
 import java.awt.GraphicsEnvironment;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
+import net.trajano.commons.testing.UtilityClassTestUtil;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import net.trajano.commons.testing.UtilityClassTestUtil;
 
 /**
@@ -18,12 +14,4 @@
  */
 class FontsManagerTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Test method for {@code FontsManager#initialize}
Index: /trunk/test/unit/org/openstreetmap/josm/tools/ImageResizeModeTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/ImageResizeModeTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/ImageResizeModeTest.java	(revision 18037)
@@ -8,22 +8,12 @@
 import java.awt.Dimension;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link ImageResizeMode} class.
  */
+@BasicPreferences
 class ImageResizeModeTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     final Dimension image = new Dimension(64, 48);
     final Dimension smallImage = new Dimension(14, 10);
Index: /trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java	(revision 18037)
@@ -14,8 +14,4 @@
 
 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;
 
 /**
@@ -23,11 +19,4 @@
  */
 class KeyboardUtilsTest {
-    /**
-     * Initializes test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules rules = new JOSMTestRules();
-
     /**
      * Checks that definition of extended characters is correct
Index: /trunk/test/unit/org/openstreetmap/josm/tools/ListenableWeakReferenceTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/ListenableWeakReferenceTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/ListenableWeakReferenceTest.java	(revision 18037)
@@ -8,9 +8,5 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -20,10 +16,4 @@
  */
 class ListenableWeakReferenceTest {
-    /**
-     * Default test rules.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
     private Object object;
     private boolean called;
Index: /trunk/test/unit/org/openstreetmap/josm/tools/OptionParserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/OptionParserTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/OptionParserTest.java	(revision 18037)
@@ -4,6 +4,6 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.ArrayList;
@@ -13,11 +13,9 @@
 import java.util.concurrent.atomic.AtomicReference;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.I18n;
 import org.openstreetmap.josm.tools.OptionParser.OptionCount;
 import org.openstreetmap.josm.tools.OptionParser.OptionParseException;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -25,12 +23,6 @@
  * @author Michael Zangl
  */
+@I18n
 class OptionParserTest {
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().i18n();
-
     // A reason for moving to jupiter...
     @Test
Index: /trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 18037)
@@ -2,11 +2,8 @@
 package org.openstreetmap.josm.tools;
 
+import org.openstreetmap.josm.data.Bounds;
+
 import org.junit.Assert;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,12 +11,4 @@
 */
 class OsmUrlToBoundsTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Test for {@link OsmUrlToBounds#positionToBounds}.
Index: /trunk/test/unit/org/openstreetmap/josm/tools/StreamUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/StreamUtilsTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/StreamUtilsTest.java	(revision 18037)
@@ -1,8 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.tools;
-
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -11,6 +7,6 @@
 import java.util.stream.Collectors;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import net.trajano.commons.testing.UtilityClassTestUtil;
+import org.junit.jupiter.api.Test;
 
 /**
@@ -18,12 +14,4 @@
  */
 class StreamUtilsTest {
-
-    /**
-     * Setup rule.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Tests that {@code StreamUtils} satisfies utility class criteria.
Index: /trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java	(revision 18037)
@@ -7,13 +7,11 @@
 
 import org.junit.Assert;
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Test {@link Tag2Link}
  */
+@BasicPreferences
 class Tag2LinkTest {
 
@@ -27,11 +25,4 @@
         Assert.assertEquals(Arrays.asList(expected), links);
     }
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: /trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/TextTagParserTest.java	(revision 18037)
@@ -11,21 +11,13 @@
 import java.util.Map;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
  * Unit tests of {@link TextTagParser} class.
  */
+// Some of this depends on preferences
+@BasicPreferences
 class TextTagParserTest {
-    /**
-     * Some of this depends on preferences.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test of {@link TextTagParser#unescape} method.
Index: /trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 18037)
@@ -22,10 +22,6 @@
 import java.util.regex.Pattern;
 
+import net.trajano.commons.testing.UtilityClassTestUtil;
 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 net.trajano.commons.testing.UtilityClassTestUtil;
 
 /**
@@ -33,11 +29,4 @@
  */
 class UtilsTest {
-    /**
-     * Use default, basic test rules.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules rules = new JOSMTestRules();
-
     /**
      * Tests that {@code Utils} satisfies utility class criteria.
Index: /trunk/test/unit/org/openstreetmap/josm/tools/XmlUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/XmlUtilsTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/XmlUtilsTest.java	(revision 18037)
@@ -2,12 +2,11 @@
 package org.openstreetmap.josm.tools;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.StringWriter;
 
 import javax.xml.parsers.ParserConfigurationException;
@@ -16,11 +15,11 @@
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.StringWriter;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.openstreetmap.josm.TestUtils;
+
+import org.junit.jupiter.api.Test;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
@@ -28,12 +27,4 @@
  */
 class XmlUtilsTest {
-
-    /**
-     * Use default, basic test rules.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules rules = new JOSMTestRules();
-
     private static final String EXPECTED = "External Entity: Failed to read external document 'passwd', " +
             "because 'file' access is not allowed due to restriction set by the accessExternalDTD property.";
Index: /trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java	(revision 18037)
@@ -4,9 +4,5 @@
 import java.util.concurrent.CountDownLatch;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -14,11 +10,4 @@
  */
 class BugReportExceptionHandlerTest {
-    /**
-     * No dependencies
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules();
-
     /**
      * Unit test for {@link BugReportExceptionHandler#handleException} method.
Index: /trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java	(revision 18036)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java	(revision 18037)
@@ -10,10 +10,7 @@
 import java.io.StringWriter;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 import org.openstreetmap.josm.actions.ShowStatusReportAction;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
 
 /**
@@ -21,12 +18,7 @@
  * @author Michael Zangl
  */
+// Preferences for the report text
+@BasicPreferences
 class BugReportTest {
-    /**
-     * Preferences for the report text
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences();
-
     /**
      * Test {@link BugReport#getReportText}
