Index: /applications/editors/josm/plugins/o5m/.classpath
===================================================================
--- /applications/editors/josm/plugins/o5m/.classpath	(revision 34836)
+++ /applications/editors/josm/plugins/o5m/.classpath	(revision 34837)
@@ -2,6 +2,12 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" output="buildtest" path="test/unit">
+		<attributes>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="output" path="build"/>
 </classpath>
Index: /applications/editors/josm/plugins/o5m/.project
===================================================================
--- /applications/editors/josm/plugins/o5m/.project	(revision 34836)
+++ /applications/editors/josm/plugins/o5m/.project	(revision 34837)
@@ -4,8 +4,14 @@
 	<comment></comment>
 	<projects>
+		<project>josm</project>
 	</projects>
 	<buildSpec>
 		<buildCommand>
 			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
 			<arguments>
 			</arguments>
@@ -18,4 +24,5 @@
 	</buildSpec>
 	<natures>
+		<nature>org.sonar.ide.eclipse.core.sonarNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
Index: /applications/editors/josm/plugins/o5m/test/unit/org/openstreetmap/josm/plugins/o5m/io/O5mImporterTest.java
===================================================================
--- /applications/editors/josm/plugins/o5m/test/unit/org/openstreetmap/josm/plugins/o5m/io/O5mImporterTest.java	(revision 34837)
+++ /applications/editors/josm/plugins/o5m/test/unit/org/openstreetmap/josm/plugins/o5m/io/O5mImporterTest.java	(revision 34837)
@@ -0,0 +1,71 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.o5m.io;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
+import org.openstreetmap.josm.data.osm.User;
+import org.openstreetmap.josm.io.IllegalDataException;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+/**
+ * Unit tests for {@link O5mImporter}.
+ */
+public class O5mImporterTest {
+
+    /**
+     * Setup test.
+     */
+    @Rule
+    public JOSMTestRules rules = new JOSMTestRules().preferences();
+
+    private static void checkUserNull(OsmPrimitive osm, boolean hasToBeNull) {
+        User usr = osm.getUser();
+        if (hasToBeNull) {
+            assertNull(osm + " -> " + usr, usr);
+        } else {
+            assertNotNull(osm + " -> " + usr, usr);
+        }
+    }
+
+    private static void doTestMonaco(String file, boolean hasMetadataToBeNull) throws IOException, IllegalDataException {
+        DataSet ds = new O5mImporter().parseDataSet(file);
+        assertNotNull(ds);
+        assertEquals(18685, ds.getNodes().size());
+        assertEquals(16735, ds.getWays().size());
+        assertEquals(476, ds.getRelations().size());
+
+        checkUserNull(ds.getPrimitiveById(1790048269, OsmPrimitiveType.NODE), hasMetadataToBeNull);
+        checkUserNull(ds.getPrimitiveById(4227155, OsmPrimitiveType.WAY), hasMetadataToBeNull);
+        checkUserNull(ds.getPrimitiveById(393226, OsmPrimitiveType.RELATION), hasMetadataToBeNull);
+    }
+
+    /**
+     * Unit test of {@link O5mImporter#parseDataSet(String)}.
+     * File should contain same data as corresponding file monaco-latest.osm.pbf.
+     * @throws Exception if an error occurs
+     */
+    @Test
+    public void testParseDataSet() throws Exception {
+        doTestMonaco(TestUtils.getTestDataRoot() + "/monaco-latest.o5m", false);
+    }
+
+    /**
+     * Unit test of {@link O5mImporter#parseDataSet(String)} with stripped file.
+     * File was created with osmconvert monaco-latest --drop-version -o=monaco-drop-version.o5m
+     * @throws Exception if an error occurs
+     */
+    @Test
+    public void testParseDataSetDropVersion() throws Exception {
+        doTestMonaco(TestUtils.getTestDataRoot() + "/monaco-drop-version.o5m", true);
+    }
+}
