Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 7062)
+++ /trunk/build.xml	(revision 7063)
@@ -259,4 +259,5 @@
         </fileset>
         <pathelement path="dist/josm-custom.jar"/>
+        <pathelement path="tools/groovy-all-2.2.2.jar"/>
     </path>
     <target name="test-init">
@@ -270,19 +271,14 @@
     </target>
     <target name="test-compile" depends="test-init,dist">
-        <javac srcdir="${test.dir}/unit" classpathref="test.classpath" destdir="${test.dir}/build" target="1.7" source="1.7" debug="on"
-        	includeantruntime="false" createMissingPackageInfoClass="off" encoding="UTF-8">
-            <compilerarg value="-Xlint:all"/>
-            <compilerarg value="-Xlint:-serial"/>
-        </javac>
-        <javac srcdir="${test.dir}/functional" classpathref="test.classpath" destdir="${test.dir}/build" target="1.7" source="1.7" debug="on"
-        	includeantruntime="false" createMissingPackageInfoClass="off" encoding="UTF-8">
-            <compilerarg value="-Xlint:all"/>
-            <compilerarg value="-Xlint:-serial"/>
-        </javac>
-        <javac srcdir="${test.dir}/performance" classpathref="test.classpath" destdir="${test.dir}/build" target="1.7" source="1.7" debug="on"
-        	includeantruntime="false" createMissingPackageInfoClass="off" encoding="UTF-8">
-            <compilerarg value="-Xlint:all"/>
-            <compilerarg value="-Xlint:-serial"/>
-        </javac>
+        <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="tools/groovy-all-2.2.2.jar"/>
+        <groovyc classpathref="test.classpath" destdir="${test.dir}/build" encoding="UTF-8">
+        	<src path="${test.dir}/unit"/>
+            <src path="${test.dir}/functional"/>
+            <src path="${test.dir}/performance"/>
+        	<javac target="1.7" source="1.7" debug="on">
+                <compilerarg value="-Xlint:all"/>
+                <compilerarg value="-Xlint:-serial"/>
+        	</javac>
+        </groovyc>
     </target>
     <target name="test" depends="test-compile">
@@ -302,5 +298,5 @@
                 <formatter type="xml"/>
                 <batchtest fork="yes" todir="${test.dir}/report">
-                    <fileset dir="${test.dir}/unit" includes="**/*.java"/>
+                    <fileset dir="${test.dir}/build" includes="**/*Test.class"/>
                 </batchtest>
             </junit>
Index: /trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java	(revision 7063)
+++ /trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java	(revision 7063)
@@ -0,0 +1,43 @@
+package org.openstreetmap.josm.data;
+
+import org.junit.Test;
+import org.openstreetmap.josm.data.coor.LatLon;
+
+import static org.junit.Assert.assertTrue;
+
+public class BoundsTest {
+
+    @Test
+    public void crossingTests() {
+        Bounds b1 = new Bounds(0, 170, 50, -170);
+        assertTrue(b1.crosses180thMeridian());
+        assertTrue(!b1.contains(new LatLon(-10, -180)));
+        assertTrue(b1.contains(new LatLon(0, -180)));
+        assertTrue(b1.contains(new LatLon(50, -180)));
+        assertTrue(!b1.contains(new LatLon(60, -180)));
+        assertTrue(!b1.contains(new LatLon(-10, 180)));
+        assertTrue(b1.contains(new LatLon(0, 180)));
+        assertTrue(b1.contains(new LatLon(50, 180)));
+        assertTrue(!b1.contains(new LatLon(60, 180)));
+
+        Bounds b2 = new Bounds(60, 170, 90, -170);
+        assertTrue(!b1.intersects(b2));
+        assertTrue(!b2.intersects(b1));
+
+        Bounds b3 = new Bounds(25, 170, 90, -170);
+        assertTrue(b1.intersects(b3));
+        assertTrue(b3.intersects(b1));
+        assertTrue(b2.intersects(b3));
+        assertTrue(b3.intersects(b2));
+        
+        b3.extend(b1);
+        assertTrue(b3.equals(new Bounds(0, 170, 90, -170)));
+        assertTrue(b1.intersects(b3));
+        assertTrue(b3.intersects(b1));
+        assertTrue(b2.intersects(b3));
+        assertTrue(b3.intersects(b2));
+        
+        b3.extend(new LatLon(0, 0));
+        assertTrue(b3.equals(new Bounds(0, 0, 90, -170)));
+    }
+}
Index: unk/test/unit/org/openstreetmap/josm/data/BoundsTests.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/BoundsTests.java	(revision 7062)
+++ 	(revision )
@@ -1,43 +1,0 @@
-package org.openstreetmap.josm.data;
-
-import org.junit.Test;
-import org.openstreetmap.josm.data.coor.LatLon;
-
-import static org.junit.Assert.assertTrue;
-
-public class BoundsTests {
-
-    @Test
-    public void crossingTests() {
-        Bounds b1 = new Bounds(0, 170, 50, -170);
-        assertTrue(b1.crosses180thMeridian());
-        assertTrue(!b1.contains(new LatLon(-10, -180)));
-        assertTrue(b1.contains(new LatLon(0, -180)));
-        assertTrue(b1.contains(new LatLon(50, -180)));
-        assertTrue(!b1.contains(new LatLon(60, -180)));
-        assertTrue(!b1.contains(new LatLon(-10, 180)));
-        assertTrue(b1.contains(new LatLon(0, 180)));
-        assertTrue(b1.contains(new LatLon(50, 180)));
-        assertTrue(!b1.contains(new LatLon(60, 180)));
-
-        Bounds b2 = new Bounds(60, 170, 90, -170);
-        assertTrue(!b1.intersects(b2));
-        assertTrue(!b2.intersects(b1));
-
-        Bounds b3 = new Bounds(25, 170, 90, -170);
-        assertTrue(b1.intersects(b3));
-        assertTrue(b3.intersects(b1));
-        assertTrue(b2.intersects(b3));
-        assertTrue(b3.intersects(b2));
-        
-        b3.extend(b1);
-        assertTrue(b3.equals(new Bounds(0, 170, 90, -170)));
-        assertTrue(b1.intersects(b3));
-        assertTrue(b3.intersects(b1));
-        assertTrue(b2.intersects(b3));
-        assertTrue(b3.intersects(b2));
-        
-        b3.extend(new LatLon(0, 0));
-        assertTrue(b3.equals(new Bounds(0, 0, 90, -170)));
-    }
-}
Index: unk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandling.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandling.java	(revision 7062)
+++ 	(revision )
@@ -1,145 +1,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.data.osm;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.coor.LatLon;
-
-/**
- * Some unit test cases for basic tag management on {@link OsmPrimitive}. Uses
- * {@link Node} for the tests, {@link OsmPrimitive} is abstract.
- *
- */
-public class OsmPrimitiveKeyHandling {
-
-    @BeforeClass
-    public static void init() {
-        Main.initApplicationPreferences();
-    }
-
-    /**
-     * test query and get methods on a node withouth keys
-     */
-    @Test
-    public void emptyNode() {
-        Node n = new Node();
-        assertTrue(n.getKeys().size() == 0);
-        assertTrue(!n.hasKeys());
-        assertTrue(!n.hasKey("nosuchkey"));
-        assertTrue(n.keySet().isEmpty());
-
-        n.remove("nosuchkey"); // should work
-    }
-
-    /**
-     * Adds a tag to an empty node and test the query and get methods.
-     */
-    @Test
-    public void put() {
-        Node n = new Node();
-        n.put("akey", "avalue");
-        assertTrue(n.get("akey").equals("avalue"));
-        assertTrue(n.getKeys().size() == 1);
-
-        assertTrue(n.keySet().size() == 1);
-        assertTrue(n.keySet().contains("akey"));
-    }
-
-    /**
-     * Adds two tags to an empty node and test the query and get methods.
-     */
-    @Test
-    public void put2() {
-        Node n = new Node();
-        n.put("key.1", "value.1");
-        n.put("key.2", "value.2");
-        assertTrue(n.get("key.1").equals("value.1"));
-        assertTrue(n.get("key.2").equals("value.2"));
-        assertTrue(n.getKeys().size() == 2);
-        assertTrue(n.hasKeys());
-        assertTrue(n.hasKey("key.1"));
-        assertTrue(n.hasKey("key.2"));
-        assertTrue(!n.hasKey("nosuchkey"));
-    }
-
-    /**
-     * Removes tags from a node with two tags and test the state of the node.
-     */
-    @Test
-    public void remove() {
-        Node n = new Node();
-        n.put("key.1", "value.1");
-        n.put("key.2", "value.2");
-
-        n.remove("nosuchkey");               // should work
-        assertTrue(n.getKeys().size() == 2); // still 2 tags ?
-
-        n.remove("key.1");
-        assertTrue(n.getKeys().size() == 1);
-        assertTrue(!n.hasKey("key.1"));
-        assertTrue(n.get("key.1") == null);
-        assertTrue(n.hasKey("key.2"));
-        assertTrue(n.get("key.2").equals("value.2"));
-
-        n.remove("key.2");
-        assertTrue(n.getKeys().size() == 0);
-        assertTrue(!n.hasKey("key.1"));
-        assertTrue(n.get("key.1") == null);
-        assertTrue(!n.hasKey("key.2"));
-        assertTrue(n.get("key.2") == null);
-    }
-
-    /**
-     * Removes all tags from a node.
-     */
-    @Test
-    public void removeAll() {
-        Node n = new Node();
-
-        n.put("key.1", "value.1");
-        n.put("key.2", "value.2");
-
-        n.removeAll();
-        assertTrue(n.getKeys().size() == 0);
-    }
-
-    /**
-     * Test hasEqualSemanticAttributes on two nodes whose identical tags are added
-     * in different orders.
-     */
-    @Test
-    public void hasEqualSemanticAttributes() {
-        Node n1 = new Node(1);
-        n1.setCoor(new LatLon(0,0));
-        n1.put("key.1", "value.1");
-        n1.put("key.2", "value.2");
-
-        Node n2 = new Node(1);
-        n2.setCoor(new LatLon(0,0));
-        n2.put("key.2", "value.2");
-        n2.put("key.1", "value.1");
-
-        assertTrue(n1.hasEqualSemanticAttributes(n2));
-    }
-
-    /**
-     * Test hasEqualSemanticAttributes on two nodes with different tags.
-     */
-    @Test
-    public void hasEqualSemanticAttributes_2() {
-        Node n1 = new Node(1);
-        n1.setCoor(new LatLon(0,0));
-        n1.put("key.1", "value.1");
-        n1.put("key.2", "value.3");
-
-        Node n2 = new Node(1);
-        n2.setCoor(new LatLon(0,0));
-        n2.put("key.1", "value.1");
-        n2.put("key.2", "value.4");
-
-        assertTrue(!n1.hasEqualSemanticAttributes(n2));
-    }
-}
Index: /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 7063)
+++ /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 7063)
@@ -0,0 +1,145 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.osm;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.LatLon;
+
+/**
+ * Some unit test cases for basic tag management on {@link OsmPrimitive}. Uses
+ * {@link Node} for the tests, {@link OsmPrimitive} is abstract.
+ *
+ */
+public class OsmPrimitiveKeyHandlingTest {
+
+    @BeforeClass
+    public static void init() {
+        Main.initApplicationPreferences();
+    }
+
+    /**
+     * test query and get methods on a node withouth keys
+     */
+    @Test
+    public void emptyNode() {
+        Node n = new Node();
+        assertTrue(n.getKeys().size() == 0);
+        assertTrue(!n.hasKeys());
+        assertTrue(!n.hasKey("nosuchkey"));
+        assertTrue(n.keySet().isEmpty());
+
+        n.remove("nosuchkey"); // should work
+    }
+
+    /**
+     * Adds a tag to an empty node and test the query and get methods.
+     */
+    @Test
+    public void put() {
+        Node n = new Node();
+        n.put("akey", "avalue");
+        assertTrue(n.get("akey").equals("avalue"));
+        assertTrue(n.getKeys().size() == 1);
+
+        assertTrue(n.keySet().size() == 1);
+        assertTrue(n.keySet().contains("akey"));
+    }
+
+    /**
+     * Adds two tags to an empty node and test the query and get methods.
+     */
+    @Test
+    public void put2() {
+        Node n = new Node();
+        n.put("key.1", "value.1");
+        n.put("key.2", "value.2");
+        assertTrue(n.get("key.1").equals("value.1"));
+        assertTrue(n.get("key.2").equals("value.2"));
+        assertTrue(n.getKeys().size() == 2);
+        assertTrue(n.hasKeys());
+        assertTrue(n.hasKey("key.1"));
+        assertTrue(n.hasKey("key.2"));
+        assertTrue(!n.hasKey("nosuchkey"));
+    }
+
+    /**
+     * Removes tags from a node with two tags and test the state of the node.
+     */
+    @Test
+    public void remove() {
+        Node n = new Node();
+        n.put("key.1", "value.1");
+        n.put("key.2", "value.2");
+
+        n.remove("nosuchkey");               // should work
+        assertTrue(n.getKeys().size() == 2); // still 2 tags ?
+
+        n.remove("key.1");
+        assertTrue(n.getKeys().size() == 1);
+        assertTrue(!n.hasKey("key.1"));
+        assertTrue(n.get("key.1") == null);
+        assertTrue(n.hasKey("key.2"));
+        assertTrue(n.get("key.2").equals("value.2"));
+
+        n.remove("key.2");
+        assertTrue(n.getKeys().size() == 0);
+        assertTrue(!n.hasKey("key.1"));
+        assertTrue(n.get("key.1") == null);
+        assertTrue(!n.hasKey("key.2"));
+        assertTrue(n.get("key.2") == null);
+    }
+
+    /**
+     * Removes all tags from a node.
+     */
+    @Test
+    public void removeAll() {
+        Node n = new Node();
+
+        n.put("key.1", "value.1");
+        n.put("key.2", "value.2");
+
+        n.removeAll();
+        assertTrue(n.getKeys().size() == 0);
+    }
+
+    /**
+     * Test hasEqualSemanticAttributes on two nodes whose identical tags are added
+     * in different orders.
+     */
+    @Test
+    public void hasEqualSemanticAttributes() {
+        Node n1 = new Node(1);
+        n1.setCoor(new LatLon(0,0));
+        n1.put("key.1", "value.1");
+        n1.put("key.2", "value.2");
+
+        Node n2 = new Node(1);
+        n2.setCoor(new LatLon(0,0));
+        n2.put("key.2", "value.2");
+        n2.put("key.1", "value.1");
+
+        assertTrue(n1.hasEqualSemanticAttributes(n2));
+    }
+
+    /**
+     * Test hasEqualSemanticAttributes on two nodes with different tags.
+     */
+    @Test
+    public void hasEqualSemanticAttributes_2() {
+        Node n1 = new Node(1);
+        n1.setCoor(new LatLon(0,0));
+        n1.put("key.1", "value.1");
+        n1.put("key.2", "value.3");
+
+        Node n2 = new Node(1);
+        n2.setCoor(new LatLon(0,0));
+        n2.put("key.1", "value.1");
+        n2.put("key.2", "value.4");
+
+        assertTrue(!n1.hasEqualSemanticAttributes(n2));
+    }
+}
