public ConnectionAuthContext authorizePeer(X509Certificate cert) { return authorizePeer(List.of(cert)); }
@Test
    void can_match_multiple_policies() {
        RequiredPeerCredential cnRequirement = createRequiredCredential(CN, "*.matching.cn");
        RequiredPeerCredential sanRequirement = createRequiredCredential(SAN_DNS, "*.matching.san");

        PeerAuthorizer peerAuthorizer = createPeerAuthorizer(
                createPolicy(POLICY_1, cnRequirement, sanRequirement),
                createPolicy(POLICY_2, cnRequirement, sanRequirement));

        ConnectionAuthContext result = peerAuthorizer
                .authorizePeer(createCertificate("foo.matching.cn", List.of("foo.matching.san"), List.of()));
        assertAuthorized(result);
        assertThat(result.matchedPolicies()).containsOnly(POLICY_1, POLICY_2);
    }