use of org.eclipse.che.multiuser.machine.authentication.server.signature.model.impl.SignatureKeyImpl in project devspaces-images by redhat-developer.
the class SignatureKeyManagerTest method shouldThrowsExceptionWhenAlgorithmIsNotSupported.
@Test(expectedExceptions = SignatureKeyManagerException.class)
public void shouldThrowsExceptionWhenAlgorithmIsNotSupported() throws Exception {
final SignatureKeyImpl publicKey = new SignatureKeyImpl(new byte[] {}, "ECDH", "PKCS#15");
final SignatureKeyImpl privateKey = new SignatureKeyImpl(new byte[] {}, "ECDH", "PKCS#3");
final SignatureKeyPairImpl kp = new SignatureKeyPairImpl("id_" + 1, publicKey, privateKey);
doReturn(kp).when(signatureKeyDao).get(anyString());
signatureKeyManager.getOrCreateKeyPair("ws1");
verify(signatureKeyDao).get(anyString());
}
use of org.eclipse.che.multiuser.machine.authentication.server.signature.model.impl.SignatureKeyImpl in project che-server by eclipse-che.
the class SignatureKeyManagerTest method shouldThrowsExceptionWhenAlgorithmIsNotSupported.
@Test(expectedExceptions = SignatureKeyManagerException.class)
public void shouldThrowsExceptionWhenAlgorithmIsNotSupported() throws Exception {
final SignatureKeyImpl publicKey = new SignatureKeyImpl(new byte[] {}, "ECDH", "PKCS#15");
final SignatureKeyImpl privateKey = new SignatureKeyImpl(new byte[] {}, "ECDH", "PKCS#3");
final SignatureKeyPairImpl kp = new SignatureKeyPairImpl("id_" + 1, publicKey, privateKey);
doReturn(kp).when(signatureKeyDao).get(anyString());
signatureKeyManager.getOrCreateKeyPair("ws1");
verify(signatureKeyDao).get(anyString());
}
Aggregations