Index: trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 9952)
+++ trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 9954)
@@ -474,5 +474,5 @@
             @Override
             public FontRenderContext getFontRenderContext() {
-                return null;
+                return new FontRenderContext(null, false, false);
             }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java	(revision 9954)
+++ trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java	(revision 9954)
@@ -0,0 +1,45 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+
+import java.awt.Color;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.gui.MapScaler.AccessibleMapScaler;
+
+/**
+ * Unit tests of {@link MapScaler} class.
+ */
+public class MapScalerTest {
+
+    /**
+     * Setup tests
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init(true);
+    }
+
+    /**
+     * Unit test of {@link MapScaler#MapScaler}.
+     */
+    @Test
+    public void testMapScaler() {
+        assertEquals(Color.WHITE, MapScaler.getColor());
+        MapScaler ms = new MapScaler(Main.map.mapView);
+        assertEquals("/MapView/Scaler", ms.helpTopic());
+        ms.paint(TestUtils.newGraphics());
+        AccessibleMapScaler ams = (AccessibleMapScaler) ms.getAccessibleContext();
+        assertEquals(1000.0, ams.getCurrentAccessibleValue().doubleValue(), 1e-3);
+        assertFalse(ams.setCurrentAccessibleValue(500));
+        assertNull(ams.getMinimumAccessibleValue());
+        assertNull(ams.getMaximumAccessibleValue());
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/bbox/SizeButtonTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/bbox/SizeButtonTest.java	(revision 9954)
+++ trunk/test/unit/org/openstreetmap/josm/gui/bbox/SizeButtonTest.java	(revision 9954)
@@ -0,0 +1,42 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.bbox;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.gui.bbox.SizeButton.AccessibleSizeButton;
+
+/**
+ * Unit tests of {@link SizeButton} class.
+ */
+public class SizeButtonTest {
+
+    /**
+     * Setup tests
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init(true);
+    }
+
+    /**
+     * Unit test of {@link SizeButton#SizeButton}.
+     */
+    @Test
+    public void testSizeButton() {
+        SizeButton sb = new SizeButton(new SlippyMapBBoxChooser());
+        sb.paint(TestUtils.newGraphics());
+        AccessibleSizeButton asb = (AccessibleSizeButton) sb.getAccessibleContext();
+        assertEquals(1, asb.getAccessibleActionCount());
+        assertEquals("toggle", asb.getAccessibleActionDescription(0));
+        assertFalse(sb.isEnlarged());
+        assertTrue(asb.doAccessibleAction(0));
+        sb.paint(TestUtils.newGraphics());
+        assertTrue(sb.isEnlarged());
+    }
+}
