OpenMultipleMonitorsObjectsAction extends CompositeAction { @Override public boolean isEnabled() { boolean checkTargetComponent = false; boolean checkTargetHousing = false; MCTHousing targetHousing = actionContext.getTargetHousing(); checkTargetHousing = (targetHousing == null) ? false : true; AbstractComponent targetComponent = actionContext.getTargetComponent(); checkTargetComponent = (targetComponent == null) ? false : true; if (targetComponent.equals(targetHousing.getWindowComponent())) checkTargetComponent = false; return (checkTargetComponent && checkTargetHousing && (DetectGraphicsDevices.getInstance().getNumberGraphicsDevices() > DetectGraphicsDevices.MINIMUM_MONITOR_CHECK)); } OpenMultipleMonitorsObjectsAction(); @Override void actionPerformed(ActionEvent e); @Override boolean canHandle(ActionContext context); @Override boolean isEnabled();  }
@Test public void testIsEnabled() { Assert.assertNotNull(openMultiMonitorsObjectsAction); }