StateTree { public void unregisterNode(StateNode node) { assert assertValidNode(node); assert node != rootNode : "Root node can't be unregistered"; idToNode.delete(getKey(node)); node.unregister(); } StateTree(Registry registry); void setUpdateInProgress(boolean updateInProgress); boolean isUpdateInProgress(); final void registerNode(StateNode node); void unregisterNode(StateNode node); void prepareForResync(); StateNode getNode(int id); StateNode getRootNode(); void sendEventToServer(StateNode node, String eventType,
            JsonObject eventData); void sendNodePropertySyncToServer(MapProperty property); void sendTemplateEventToServer(StateNode node, String methodName,
            JsArray<?> argsArray, int promiseId); void sendExistingElementAttachToServer(StateNode parent,
            int requestedId, int assignedId, String tagName, int index); void sendExistingElementWithIdAttachToServer(StateNode parent,
            int requestedId, int assignedId, String id); Registry getRegistry(); boolean isVisible(StateNode node); boolean isActive(StateNode node);  }
@Test(expected = AssertionError.class) public void unregisterNonRegisteredNode() { tree.unregisterNode(node); }