### Question:
NodeState { void moveNodeToNextState(NodeStateContext nodeStateContext, NodeState nextState) { nodeStateContext.setCurrentNodeState(nextState); }  abstract void initialize(NodeStateContext nodeStateContext); abstract void handlePersist(NodeStateContext nodeStateContext); abstract void handleRemove(NodeStateContext nodeStateContext); abstract void handleRefresh(NodeStateContext nodeStateContext); abstract void handleMerge(NodeStateContext nodeStateContext); abstract void handleDetach(NodeStateContext nodeStateContext); abstract void handleClose(NodeStateContext nodeStateContext); abstract void handleLock(NodeStateContext nodeStateContext); abstract void handleCommit(NodeStateContext nodeStateContext); abstract void handleRollback(NodeStateContext nodeStateContext); abstract void handleFind(NodeStateContext nodeStateContext); abstract void handleGetReference(NodeStateContext nodeStateContext); abstract void handleContains(NodeStateContext nodeStateContext); abstract void handleClear(NodeStateContext nodeStateContext); abstract void handleFlush(NodeStateContext nodeStateContext);  }### Answer:
@Test public void testMoveNodeToNextState() { NodeState nodeState = new TransientState(); NodeStateContext node = new Node("1", PersonnelDTO.class, nodeState, pc, "1", null); nodeState.moveNodeToNextState(node, new ManagedState()); Assert.assertEquals(ManagedState.class, node.getCurrentNodeState().getClass()); }