@Test
void validV1CertificatePath() throws Exception
{

    Collection<X509CertificateHolder> certs = new ArrayList<>();
    certs.add(BcUtils.getX509CertificateHolder(v1CaCert));
    CollectionStore store = new CollectionStore(certs);
    CertificateProvider provider = componentManager.getInstance(CertificateProvider.class, "BCStoreX509");
    ((BcStoreX509CertificateProvider) provider).setStore(store);
    Collection<CertifiedPublicKey> chain = builder.build(v1Cert, provider);
    assertThat(chain, contains(v1CaCert, v1Cert));
}