Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 9081)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 9095)
@@ -30,4 +30,5 @@
     private ImageryInfo testImageryWALLONIE = getImagery("test/data/wmts/WMTSCapabilities-Wallonie.xml");
     private ImageryInfo testImageryOntario = getImagery("test/data/wmts/WMTSCapabilities-Ontario.xml");
+    private ImageryInfo testImagery12168 = getImagery("test/data/wmts/bug12168-WMTSCapabilities.xml");
     private ImageryInfo testLotsOfLayers = getImagery("test/data/wmts/getCapabilities-lots-of-layers.xml");
 
@@ -210,4 +211,15 @@
     }
 
+    @Test
+    public void test12168() throws IOException {
+        Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
+        WMTSTileSource testSource = new WMTSTileSource(testImagery12168);
+        testSource.initProjection(Main.getProjection());
+        assertEquals(
+                "http://www.ngi.be/cartoweb/1.0.0/topo/default/3857/7/1/1.png",
+                testSource.getTileUrl(1,  1,  1));
+    }
+
+
     // XXX: disabled as this needs user action
     //@Test
