def METHOD_NAME(client, source_plugin):
    from lemur.deployment.service import rotate_certificate
    new_certificate = CertificateFactory()
    endpoint = EndpointFactory()
    rotate_certificate(endpoint, new_certificate)
    assert endpoint.certificate == new_certificate