PlaceObjectsInMultiAction extends ContextAwareAction { @Override public boolean canHandle(ActionContext context) { if (DetectGraphicsDevices.getInstance().getNumberGraphicsDevices() > DetectGraphicsDevices.MINIMUM_MONITOR_CHECK) { if (context.getWindowManifestation() != null) { graphicsDeviceName = getActiveGraphicsDeviceName(context.getWindowManifestation()); } } selectedManifestations = context.getSelectedManifestations(); if (selectedManifestations.isEmpty()){ return false; } return true; } PlaceObjectsInMultiAction(); @Override void actionPerformed(ActionEvent e); @Override boolean canHandle(ActionContext context); @Override boolean isEnabled();  }
@Test public void testCanHandle() { Assert.assertTrue(action.canHandle(ac)); }