Index: applications/editors/josm/plugins/wikipedia/.classpath
===================================================================
--- applications/editors/josm/plugins/wikipedia/.classpath	(revision 30532)
+++ applications/editors/josm/plugins/wikipedia/.classpath	(revision 30550)
@@ -2,6 +2,8 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="test/unit"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: applications/editors/josm/plugins/wikipedia/README.template
===================================================================
--- applications/editors/josm/plugins/wikipedia/README.template	(revision 30532)
+++ 	(revision )
@@ -1,78 +1,0 @@
-README 
-======
-
-This is a template project structure for a JOSM plugin.
-
-Layout
-======
-+--- src                                source of your plugin
-  |- images                             images your plugin needs
-  |- resources                          resources your plugin needs
-
-  README                                README for your plugin
-
-  GPL-v2.0.txt                          GPL version 2 license text
-  GPL-v3.0.txt                          GPL version 3 license text
-  
-  README.template                       this file 
-  
-  
-Build
-=====  
-A JOSM plugin is built as a single jar. We use ant to build.
-
-See build.xml in this directory and update the plugin specific properties in the
-configuration section.
-  
-
-Maintaining versions
-====================
-There are two versions maintained with each plugin:
-   1) the main version
-      This is the lowest JOSM version required by this plugin.
-      You have to manually set the plugins main version in the build script.
-      Set the property plugin.main.version in build.xml accordingly. 
-
-   2) the build version
-      The build version is unique for every build of the plugin. It is equal
-      to the SVN revision of your plugin directory. 
-
- Both the main version and the build version are included in properties of the plugins
- manifest:
-    Plugin-Version      the build version
-    Plugin-Mainversion  the main version
-
- JOSM automatically detects whether a plugin needs to be upgraded. It compares the build
- version of the currently installed plugin jar with the build version of the plugin jar in 
- the SVN. The main version is irrelevant for this process.  
- 
- Making your plugin available to JOSM users
- ===========================================
- When a plugin jar is checked into SVN a script updates the plugins list on the JOSM wiki:
-   http://josm.openstreetmap.de/wiki/Plugins
- JOSM retrieves the list of available plugins and their build versions from this list.
-
-            commit      publish               read
-                       meta data              meta data 
-      Build  ==>  SVN  =======>  JOSM Wiki   <======= JOSM 
-                   ^ 
-                   ==================================
-                            fetch current plugin jar 
- 
- Note that you have to manually publish (commit) your plugin jar. There is no nightly build
- in place. Everything else (pulishing meta data, updating plugins in the client) is then handled 
- by automatic processes. 
-
-See also
-========
-* Developing Plugins 
-  http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
-  
-* List of JOSM Plugins
-  http://josm.openstreetmap.de/wiki/Plugins
-  
-  
- 
-     
-
- 
Index: applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java
===================================================================
--- applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java	(revision 30550)
+++ applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java	(revision 30550)
@@ -0,0 +1,127 @@
+package org.wikipedia;
+
+import org.junit.Test;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.tools.Predicate;
+import org.openstreetmap.josm.tools.Utils;
+import org.wikipedia.WikipediaApp.WikipediaEntry;
+import org.wikipedia.WikipediaApp.WikipediaLangArticle;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+public class WikipediaAppTest {
+
+    @Test
+    public void testPartitionList() {
+        assertThat(
+                WikipediaApp.partitionList(Arrays.asList(1, 2, 3, 4, 5), 2),
+                is(Arrays.asList(
+                        Arrays.asList(1, 2),
+                        Arrays.asList(3, 4),
+                        Arrays.asList(5)
+                ))
+        );
+    }
+
+    @Test
+    public void testParseFromUrl1() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseFromUrl("https://de.wikipedia.org/wiki/Österreich");
+        assertThat(actual.article, is("Österreich"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testParseFromUrl2() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseFromUrl("http://de.wikipedia.org/wiki/%C3%96sterreich");
+        assertThat(actual.article, is("Österreich"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testParseFromUrl3() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseFromUrl("http://de.wikipedia.org/wiki/Sternheim_%26_Emanuel");
+        assertThat(actual.article, is("Sternheim_&_Emanuel"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testParseFromUrl4() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseFromUrl("//de.wikipedia.org/wiki/Reichstagsgeb%C3%A4ude");
+        assertThat(actual.article, is("Reichstagsgebäude"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testParseFromTag0() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseTag("wikipedia", "Österreich");
+        assertThat(actual, nullValue());
+    }
+
+    @Test
+    public void testParseFromTag1() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseTag("wikipedia", "de:Österreich");
+        assertThat(actual.article, is("Österreich"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testParseFromTag2() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseTag("wikipedia:de", "Österreich");
+        assertThat(actual.article, is("Österreich"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testParseFromTag3() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseTag("wikipedia:de", "de:Österreich");
+        assertThat(actual.article, is("Österreich"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testParseFromTag4() {
+        final WikipediaLangArticle actual = WikipediaLangArticle.parseTag("wikipedia", "https://de.wikipedia.org/wiki/Österreich");
+        assertThat(actual.article, is("Österreich"));
+        assertThat(actual.lang, is("de"));
+    }
+
+    @Test
+    public void testGetInterwikiArticles1() {
+        final Collection<WikipediaLangArticle> iw = WikipediaApp.getInterwikiArticles("de", "Österreich");
+        assertThat(iw, hasItem(new WikipediaLangArticle("en", "Austria")));
+        assertThat(iw, hasItem(new WikipediaLangArticle("no", "Østerrike")));
+        assertThat(iw, hasItem(new WikipediaLangArticle("ko", "오스트리아")));
+    }
+
+    @Test
+    public void testGetInterwikiArticles2() {
+        final Collection<WikipediaLangArticle> iw = WikipediaApp.getInterwikiArticles("en", "Ampersand");
+        assertThat(iw, hasItem(new WikipediaLangArticle("fi", "&")));
+    }
+
+    @Test
+    public void testGetBrowserUrl() {
+        final WikipediaEntry entry = new WikipediaEntry("Sternheim & Emanuel", "de", "Sternheim & Emanuel");
+        assertThat(entry.getBrowserUrl(), is("https://de.wikipedia.org/wiki/Sternheim_%26_Emanuel"));
+    }
+
+    @Test
+    public void testFromCoordinates() throws Exception {
+        final List<WikipediaEntry> entries = WikipediaApp.getEntriesFromCoordinates("de",
+                new LatLon(52.5179786, 13.3753321), new LatLon(52.5192215, 13.3768705));
+        assertTrue(Utils.exists(entries, new Predicate<WikipediaEntry>() {
+            @Override
+            public boolean evaluate(WikipediaEntry entry) {
+                return "Deutscher Bundestag".equals(entry.wikipediaArticle) && "de".equals(entry.wikipediaLang);
+            }
+        }));
+    }
+}
