@Test
public void testPkiVerification() throws Exception {

    InputStream in = getClass().getResourceAsStream("pki_test.bitcoinpaymentrequest");
    Protos.PaymentRequest paymentRequest = Protos.PaymentRequest.newBuilder().mergeFrom(in).build();
    MockPaymentSession paymentSession = new MockPaymentSession(paymentRequest);
    PaymentSession.PkiVerificationData pkiData = paymentSession.verifyPki();
    assertEquals("www.bitcoincore.org", pkiData.name);
    assertEquals("The USERTRUST Network, Salt Lake City, US", pkiData.rootAuthorityName);
}