def METHOD_NAME(self):
    ns = self.global_ns.namespace('::declarations::calldef')
    return_default_args = ns.calldef('return_default_args')
    # Legacy way of fetching dependencies. Is still valid but deprecated
    warnings.simplefilter("ignore", Warning)
    dependencies_old = return_default_args.i_depend_on_them()
    warnings.simplefilter("error", Warning)
    self.assertTrue(len(dependencies_old) == 3)
    used_types = [
        dependency.depend_on_it.decl_string
        for dependency in dependencies_old]
    self.assertTrue(used_types == ['int', 'int', 'bool'])
    dependencies_new = declarations.get_dependencies_from_decl(
        return_default_args)
    self.assertTrue(len(dependencies_new) == 3)
    used_types = [
        dependency.depend_on_it.decl_string
        for dependency in dependencies_new]
    self.assertTrue(used_types == ['int', 'int', 'bool'])
    some_exception = ns.class_('some_exception_t')
    other_exception = ns.class_('other_exception_t')
    calldef_with_throw = ns.calldef('calldef_with_throw')
    # Legacy way of fetching dependencies. Is still valid but deprecated
    warnings.simplefilter("ignore", Warning)
    dependencies_old = calldef_with_throw.i_depend_on_them()
    warnings.simplefilter("error", Warning)
    self.assertTrue(len(dependencies_old) == 3)
    dependencies_old = [
        dependency for dependency in dependencies_old if
        dependency.depend_on_it in (some_exception, other_exception)]
    self.assertTrue(len(dependencies_old) == 2)
    dependencies_new = declarations.get_dependencies_from_decl(
        calldef_with_throw)
    self.assertTrue(len(dependencies_new) == 3)
    dependencies_new = [
        dependency for dependency in dependencies_new if
        dependency.depend_on_it in (some_exception, other_exception)]
    self.assertTrue(len(dependencies_new) == 2)