Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 11780)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 11781)
@@ -254,4 +254,7 @@
     }
 
+    /**
+     * Reloads all styles from the preferences.
+     */
     public static void readFromPreferences() {
         styles.clear();
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 11780)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 11781)
@@ -49,4 +49,10 @@
     }
 
+    /**
+     * Get the style for a specific style. Returns the range as well.
+     * @param scale The current scale
+     * @param selected true to get the state for a selected element,
+     * @return The style and the range it is valid for.
+     */
     public Pair<StyleElementList, Range> getWithRange(double scale, boolean selected) {
         int idx = getIndex(selected);
@@ -88,4 +94,12 @@
 
     /**
+     * Clears the style cache. This should only be used for testing.
+     * It may be removed some day and replaced by a WeakReference implementation that automatically forgets old entries.
+     */
+    static void clearStyleCachePool() {
+        internPool.clear();
+    }
+
+    /**
      * Get the size of the intern pool. Only for tests!
      * @return size of the intern pool
Index: /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 11780)
+++ /trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 11781)
@@ -17,5 +17,4 @@
 import org.junit.Rule;
 import org.junit.Test;
-import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
@@ -53,5 +52,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().mapStyles();
+    public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().mapStyles().timeout(60000);
 
     /**
@@ -112,7 +111,5 @@
     @Test
     public void testStyleCacheInternPool() {
-        // This can be removed if there was no dependency on Main.map in some MapCSS conditions. See #14572
-        JOSMFixture.createFunctionalTestFixture().init(true);
-
+        StyleCache.clearStyleCachePool();
         Bounds bounds = new Bounds(53.56, 13.25, 53.57, 13.26);
         Rendering visitor = new StyledMapRenderer(g, nc, false);
@@ -141,7 +138,5 @@
     @Test
     public void testStyleCacheInternPool2() {
-        // This can be removed if there was no dependency on Main.map in some MapCSS conditions. See #14572
-        JOSMFixture.createFunctionalTestFixture().init(true);
-
+        StyleCache.clearStyleCachePool();
         Bounds bounds = new Bounds(53.56, 13.25, 53.57, 13.26);
         Rendering visitor = new StyledMapRenderer(g, nc, false);
