def METHOD_NAME(self):
    leader = self.nodes[LEADER]
    router = self.nodes[ROUTER]
    # Start the leader & router devices.
    leader.start()
    self.simulator.go(config.LEADER_STARTUP_DELAY)
    self.assertEqual(leader.get_state(), 'leader')
    router.start()
    self.simulator.go(config.ROUTER_STARTUP_DELAY)
    self.assertEqual(router.get_state(), 'router')
    self.assertTrue(leader.get_router_eligible())
    self.assertTrue(router.get_router_eligible())
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # Change security policy, disable `R` bit and set version threshold to max value (7).
    leader.send_mgmt_active_set(
        active_timestamp=30,
        security_policy=[3600, 'onc', 7],
    )
    self.assertEqual(leader.get_state(), 'leader')
    self.assertEqual(router.get_state(), 'router')
    # Leader should take at least 10 seconds before downgrading.
    self.simulator.go(8)
    self.assertEqual(leader.get_state(), 'leader')
    self.assertFalse(leader.get_router_eligible())
    self.assertFalse(router.get_router_eligible())
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # Change back security policy. This should cancel the ongoing downgrade delay.
    leader.send_mgmt_active_set(
        active_timestamp=60,
        security_policy=[3600, 'ornc', 0],
    )
    self.simulator.go(1)
    self.assertEqual(leader.get_state(), 'leader')
    self.assertTrue(leader.get_router_eligible())
    # Make sure both device stay as leader and router.
    self.simulator.go(600)
    self.assertEqual(leader.get_state(), 'leader')
    self.assertEqual(router.get_state(), 'router')
    self.assertTrue(leader.get_router_eligible())
    self.assertTrue(router.get_router_eligible())
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # Change security policy again, disable `R` bit and set version threshold to max value (7).
    leader.send_mgmt_active_set(
        active_timestamp=90,
        security_policy=[3600, 'onc', 7],
    )
    self.assertEqual(leader.get_state(), 'leader')
    # Leader should take at least 10 seconds before downgrading.
    self.simulator.go(8)
    self.assertEqual(leader.get_state(), 'leader')
    self.assertFalse(leader.get_router_eligible())
    # Make sure both leader and router are downgraded and are now `detached`.
    self.simulator.go(80)
    self.assertEqual(leader.get_state(), 'detached')
    self.assertEqual(router.get_state(), 'detached')
    self.assertFalse(leader.get_router_eligible())
    self.assertFalse(router.get_router_eligible())