Index: /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSettingTest.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSettingTest.java	(revision 31822)
+++ /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSettingTest.java	(revision 31823)
@@ -5,4 +5,5 @@
 import static org.junit.Assert.assertTrue;
 
+import java.awt.GraphicsEnvironment;
 import java.lang.reflect.Field;
 
@@ -20,4 +21,7 @@
   @Test
   public void testAddGui() {
+    if (GraphicsEnvironment.isHeadless()) {
+      return;
+    }
     PreferenceTabbedPane tabs = new PreferenceTabbedPane();
     tabs.buildGui();
@@ -31,4 +35,7 @@
   @Test
   public void testLoginLogout() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
+    if (GraphicsEnvironment.isHeadless()) {
+      return;
+    }
     PreferenceTabbedPane tabs = new PreferenceTabbedPane();
     tabs.buildGui();
