def METHOD_NAME(self):
    self.integration = Integration.objects.create(
        provider="bitbucket_server",
        name="Bitbucket Server",
        metadata={"base_url": "https://bitbucket.example.com", "verify_ssl": True},
    )
    idp = self.create_identity_provider(integration=self.integration)
    self.identity = self.create_identity(
        user=self.user,
        identity_provider=idp,
        external_id="bitbucket:123",
        data={
            "consumer_key": "cnsmr-key",
            "private_key": EXAMPLE_PRIVATE_KEY,
            "access_token": "acs-tkn",
            "access_token_secret": "acs-tkn-scrt",
        },
    )
    self.integration.add_organization(
        self.organization, self.user, default_auth_id=self.identity.id
    )
    self.install = self.integration.get_installation(self.organization.id)
    self.bb_server_client: BitbucketServerClient = self.install.get_client()