use of org.xwiki.crypto.pkix.params.CertifiedKeyPair in project xwiki-platform by xwiki.
the class X509KeyWikiStoreTest method retrieveMissingPrivateKeyFromSpace.
@Test
public void retrieveMissingPrivateKeyFromSpace() throws Exception {
XWikiDocument storeDoc = mock(XWikiDocument.class);
when(xwiki.getDocument(new DocumentReference(WIKI, SPACE, ENCODED_SUBJECTKEYID), xcontext)).thenReturn(storeDoc);
when(query.<Object[]>execute()).thenReturn(Collections.singletonList(new Object[] { "space." + ENCODED_SUBJECTKEYID, 0 }));
CertifiedKeyPair keyPair = store.retrieve(SPACE_STORE_REF, certificate);
assertThat(keyPair, nullValue());
}
Aggregations