Index: /trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 8256)
+++ /trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 8257)
@@ -67,5 +67,5 @@
         final OsmPrimitive p = "n".equals(x[0]) || "node".equals(x[0])
                 ? new Node(LatLon.ZERO)
-                : "w".equals(x[0]) || "way".equals(x[0])
+                : "w".equals(x[0]) || "way".equals(x[0]) || /*for MapCSS related usage*/ "area".equals(x[0])
                 ? new Way()
                 : "r".equals(x[0]) || "relation".equals(x[0])
@@ -73,5 +73,5 @@
                 : null;
         if (p == null) {
-            throw new IllegalArgumentException("Expecting n/node/w/way/r/relation, but got " + x[0]);
+            throw new IllegalArgumentException("Expecting n/node/w/way/r/relation/area, but got '" + x[0] + "'");
         }
         for (final Map.Entry<String, String> i : TextTagParser.readTagsFromText(x[1]).entrySet()) {
Index: /trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 8256)
+++ /trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 8257)
@@ -2,16 +2,8 @@
 package org.openstreetmap.josm;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.util.Arrays;
 import java.util.Comparator;
-
-import org.junit.Test;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.OsmUtils;
-import org.openstreetmap.josm.data.osm.Way;
 
 /**
@@ -50,18 +42,4 @@
     public static String getRegressionDataFile(int ticketid, String filename) {
         return getRegressionDataDir(ticketid) + '/' + filename;
-    }
-
-    @Test
-    public void testCreatePrimitive() throws Exception {
-        final OsmPrimitive p = OsmUtils.createPrimitive("way name=Foo railway=rail");
-        assertTrue(p instanceof Way);
-        assertThat(p.keySet().size(), is(2));
-        assertThat(p.get("name"), is("Foo"));
-        assertThat(p.get("railway"), is("rail"));
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testCreatePrimitiveFail() throws Exception {
-        OsmUtils.createPrimitive("noway name=Foo");
     }
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java	(revision 8257)
+++ /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java	(revision 8257)
@@ -0,0 +1,40 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.osm;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+
+public class OsmUtilsTest {
+
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    @Test
+    public void testCreatePrimitive() throws Exception {
+        final OsmPrimitive p = OsmUtils.createPrimitive("way name=Foo railway=rail");
+        assertTrue(p instanceof Way);
+        assertThat(p.keySet().size(), is(2));
+        assertThat(p.get("name"), is("Foo"));
+        assertThat(p.get("railway"), is("rail"));
+    }
+
+    @Test
+    public void testArea() throws Exception {
+        final OsmPrimitive p = OsmUtils.createPrimitive("area name=Foo railway=rail");
+        assertThat(p.getType(), is(OsmPrimitiveType.WAY));
+        assertTrue(p.getKeys().equals(OsmUtils.createPrimitive("way name=Foo railway=rail").getKeys()));
+
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testCreatePrimitiveFail() throws Exception {
+        OsmUtils.createPrimitive("noway name=Foo");
+    }
+
+}
