def test_present(self):
        name = 'test.example.com.'

        ret = {'name': name,
               'result': True,
               'changes': {},
               'comment': ''}

        mock = MagicMock(side_effect=[True, False, False])
        mock_bool = MagicMock(return_value=False)
        with patch.dict(boto_sns.__salt__,
                        {'boto_sns.exists': mock,
                         'boto_sns.create': mock_bool}):
            comt = ('AWS SNS topic {0} present.'.format(name))
            ret.update({'comment': comt})
            self.assertDictEqual(boto_sns.present(name), ret)

            with patch.dict(boto_sns.__opts__, {'test': True}):
                comt = ('AWS SNS topic {0} is set to be created.'.format(name))
                ret.update({'comment': comt, 'result': None})
                self.assertDictEqual(boto_sns.present(name), ret)

            with patch.dict(boto_sns.__opts__, {'test': False}):
                comt = ('Failed to create {0} AWS SNS topic'.format(name))
                ret.update({'comment': comt, 'result': False})
                self.assertDictEqual(boto_sns.present(name), ret)

    # 'absent' function tests: 1
When we work with ensembles it is better to return a single prody ensemble with all
dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_sns_test.py/BotoSnsTestCase.test_present--crossover with--dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/data/handler/protein/proteinEnsembleData.py/ProteinEnsembleData.get_elements