def METHOD_NAME(git_repository_with_multiple_remotes, name: Optional[str], url: Optional[str]):
    """Test getting remote of a git repository."""
    remote = get_remote(git_repository_with_multiple_remotes, name=name)
    assert remote is not None
    assert url == remote.url
    remote = get_remote(git_repository_with_multiple_remotes, url=url)
    assert remote is not None
    assert url == remote.url