'Any time commands are dispatched by ``ControlAMP`` its activity
timestamp is refreshed to prevent previously applied state from
expiring.'

def test_activity_refreshes_node_state(self):

    self.protocol.makeConnection(StringTransportWithAbort())
    cluster_state = self.control_amp_service.cluster_state
    self.successResultOf(self.client.callRemote(NodeStateCommand, state_changes=(SIMPLE_NODE_STATE,), eliot_context=TEST_ACTION))
    advance_some(self.reactor)
    self.client.callRemote(NoOp)
    advance_rest(self.reactor)
    before_wipe_state = cluster_state.as_deployment()
    advance_some(self.reactor)
    after_wipe_state = cluster_state.as_deployment()
    self.assertThat((before_wipe_state, after_wipe_state), Equals((DeploymentState(nodes={SIMPLE_NODE_STATE}), DeploymentState())))
