### Question:
FilterManagerStateController extends AbstractModuleStateController { @Override public boolean canActivateState(Node node) { try { return StateXML.newXPath().evaluate("/" + ModuleStateController.STATE_QNAME + "/:filters", node, XPathConstants.NODE) != null; } catch (XPathExpressionException e) { LOGGER.error(e, e); return false; } } FilterManagerStateController(FilterBuilderController fbController, DataGroupController dataTypeController,
            DataFilterRegistry filterRegistry, QueryRegionManager queryRegionManager, GeometryRegistry geometryRegistry); @Override void activateState(String id, String description, Collection<? extends String> tags, Node node); @Override void activateState(String id, String description, Collection<? extends String> tags, StateType state); @Override boolean canActivateState(Node node); @Override boolean canActivateState(StateType state); @Override boolean canSaveState(); @Override void deactivateState(String id, Node node); @Override void deactivateState(String id, StateType state); @Override List<? extends String> getRequiredStateDependencies(); @Override boolean isSaveStateByDefault(); @Override void saveState(Node node); @Override void saveState(StateType state);  }### Answer:
@Test public void testCanActivateState() throws ParserConfigurationException { Document doc = XMLUtilities.newDocument(); FilterManagerStateController controller = new FilterManagerStateController(null, null, null, null, null); Assert.assertFalse(controller.canActivateState(doc)); doc.appendChild(StateXML.createElement(doc, ModuleStateController.STATE_NAME)) .appendChild(doc.createElementNS(ModuleStateController.STATE_NAMESPACE, "filters")); Assert.assertTrue(controller.canActivateState(doc)); }