@Test
void createPKIXParameters_test_with_empty_trustAnchors() {

    HashSet<TrustAnchor> trustAnchors = new HashSet<>();
    Throwable t = assertThrows(IllegalArgumentException.class,
            () -> CertificateUtil.createPKIXParameters(trustAnchors)
    );
    assertThat(t).hasMessage("trustAnchors is required; it must not be empty");
}