public void testGetPrivateKey() throws Exception {
  byte[] privateKeyData={1,2,3,4,5};
  PrivateKeyStub privateKey=new PrivateKeyStub("private","fff",privateKeyData);
  PublicKeyStub publicKey=new PublicKeyStub("public","fff",null);
  KeyPair kp=new KeyPair(publicKey,privateKey);
  Signer s=new SignerStub("sss5");
  assertNull(s.getPrivateKey());
  s.setKeyPair(kp);
  assertSame(privateKey,s.getPrivateKey());
}

public void testGetPrivateKey ( ) throws Exception { byte [ ] privateKeyData = { 1 , 2 , 3 , 4 , 5 } ; PrivateKeyStub privateKey = new PrivateKeyStub ( "private" , "fff" , privateKeyData ) ; PublicKeyStub publicKey = new PublicKeyStub ( "public" , "fff" , null ) ; KeyPair kp = new KeyPair ( publicKey , privateKey ) ; Signer s = new SignerStub ( "sss5" ) ; assertNull ( s . getPrivateKey ( ) ) ; s . setKeyPair ( kp ) ; assertSame ( privateKey , s . getPrivateKey ( ) ) ; }
verify signer . getprivatekey ( ) returns null or private key
