def test_absent_operation_no_change(self):
        self.set_module_state('absent')
        from ansible_collections.misc.not_a_real_collection.plugins.modules import netscaler_service
        service_proxy_mock = MagicMock()
        attrs = {
            'diff_object.return_value': {},
        }
        service_proxy_mock.configure_mock(**attrs)

        m = MagicMock(return_value=service_proxy_mock)
        service_exists_mock = Mock(side_effect=[False, False])

        with patch.multiple(
                'ansible_collections.misc.not_a_real_collection.plugins.modules.netscaler_service',
                ConfigProxy=m,
                service_exists=service_exists_mock,
        ):
            self.module = netscaler_service
            result = self.exited()
            service_proxy_mock.assert_not_called()
            self.assertFalse(result['changed'],
                             msg='Changed status not set correctly')
    def test_absent_operation_no_change(self):
        self.set_module_state('absent')
        from ansible_collections.misc.not_a_real_collection.plugins.modules import netscaler_cs_policy
        cs_policy_mock = MagicMock()
        attrs = {
            'diff_object.return_value': {},
        }
        cs_policy_mock.configure_mock(**attrs)

        m = MagicMock(return_value=cs_policy_mock)
        policy_exists_mock = Mock(side_effect=[False, False])

        with patch.multiple(
            'ansible_collections.misc.not_a_real_collection.plugins.modules.netscaler_cs_policy',
            ConfigProxy=m,
            policy_exists=policy_exists_mock,
            nitro_exception=self.MockException,
            ensure_feature_is_enabled=Mock(),

        ):
            self.module = netscaler_cs_policy
            result = self.exited()
            cs_policy_mock.assert_not_called()
            self.assertFalse(result['changed'], msg='Changed status not set correctly')