def METHOD_NAME(session_instance):
    conn = MagicMock()
    session_instance.client.return_value = conn
    conn.describe_elasticsearch_domain.side_effect = GlobalConfig.not_found_error
    conn.describe_elasticsearch_domain_config.return_value = {
        "DomainConfig": GlobalConfig.domain_ret
    }
    conn.create_elasticsearch_domain.side_effect = botocore.exceptions.ClientError(
        GlobalConfig.error_content, "create_domain"
    )
    result = boto_elasticsearch_domain.__states__["boto_elasticsearch_domain.present"](
        "domain present", **GlobalConfig.domain_ret
    )
    assert not result["result"]
    assert "An error occurred" in result["comment"]