Index: trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 19519)
+++ trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 19528)
@@ -154,4 +154,5 @@
         nc.zoomTo(bounds);
         visitor.render(dsCity2, true, bounds);
+        ElemStyles elemStyles = MapPaintStyles.getStyles();
 
         IdentityHashMap<StyleElementList, Integer> counter = new IdentityHashMap<>();
@@ -159,7 +160,7 @@
         for (OsmPrimitive osm : dsCity2.allPrimitives()) {
             // primitives, that have been rendered, should have the cache populated
-            if (osm.getCachedStyle() != null) {
+            if (osm.getCachedStyle(elemStyles) != null) {
                 noPrimitives++;
-                Pair<StyleElementList, Range> p = osm.getCachedStyle().getWithRange(nc.getDist100Pixel(), false);
+                Pair<StyleElementList, Range> p = osm.getCachedStyle(elemStyles).getWithRange(nc.getDist100Pixel(), false);
                 StyleElementList sel = p.a;
                 assertNotNull(sel);
