DetectGraphicsDevices { public boolean isGraphicsEnvHeadless() { boolean isHeadless = false; try { isHeadless = GraphicsEnvironment.isHeadless(); logger.debug("GraphicsEnvironment.isHeadless(): " + GraphicsEnvironment.isHeadless()); } catch(HeadlessException headlessEx) { logger.error("HeadlessException: {0}", headlessEx); } logger.debug("isHeadless: {0}", isHeadless); return isHeadless; } private  DetectGraphicsDevices(); static DetectGraphicsDevices getInstance(); boolean isGraphicsEnvHeadless(); boolean isGraphicsEnvHeadlessInstance(); int getNumberGraphicsDevices(); GraphicsDevice[] getGraphicsDevice(); void setGraphicsDevice(GraphicsDevice[] graphicsDevices); GraphicsDevice getSingleGraphicDevice(); GraphicsConfiguration getSingleGraphicDeviceConfig(String graphicsDeviceName); static boolean isWindows(); static boolean isMac(); static boolean isUnixLinux(); ArrayList<String> getGraphicDeviceNames(); static final int MINIMUM_MONITOR_CHECK; static final String OPEN_MULTIPLE_MONITORS_OBJECTS_ACTION; static final String OPEN_MULTIPLE_MONITORS_THIS_ACTION; static final String OBJECTS_ADDITIONS_MENU_PATH; static final String THIS_ADDITIONS_MENU_PATH; static final String OBJECTS_SUBMENU_PATH; static final String SHOW_OBJECTS_ACTION_MULTIPLE_MONITORS_TEXT; static final String OBJECTS_OPEN_MULTIPLE_MONITORS_MENU; static final String THIS_OPEN_MULTIPLE_MONITORS_MENU; static final String SHOW_THIS_ACTION_MULTIPLE_MONITORS_TEXT; static final String DEFAULT_MULTIPLE_MONITOR_TEXT; static final String PROPER_DEVICE_NAME_PREFIX; }
@Test public void testIsGraphicsEnvHeadless() { if (detectGraphicsDevice.isGraphicsEnvHeadless()) { Assert.assertEquals(detectGraphicsDevice.isGraphicsEnvHeadless(), true); } else { Assert.assertEquals(detectGraphicsDevice.isGraphicsEnvHeadless(), false); } }