public void testGetInstance1(){
  if (this.cert == null) {
    return;
  }
  try {
    ByteArrayInputStream bais=new ByteArrayInputStream(cert.getEncoded());
    X509Certificate.getInstance(bais);
  }
 catch (  java.security.cert.CertificateEncodingException e) {
    fail("Unexpected CertificateEncodingException was thrown.");
  }
catch (  CertificateEncodingException e) {
    fail("Unexpected CertificateEncodingException was thrown.");
  }
catch (  CertificateException e) {
  }
  try {
    X509Certificate.getInstance((InputStream)null);
    fail("No expected CertificateException");
  }
 catch (  CertificateException e) {
  }
}

public void testGetInstance1 ( ) { if ( this . cert == null ) { return ; } try { ByteArrayInputStream bais = new ByteArrayInputStream ( cert . getEncoded ( ) ) ; X509Certificate . getInstance ( bais ) ; } catch ( java . security . cert . CertificateEncodingException e ) { fail ( "Unexpected CertificateEncodingException was thrown." ) ; } catch ( CertificateEncodingException e ) { fail ( "Unexpected CertificateEncodingException was thrown." ) ; } catch ( CertificateException e ) { } try { X509Certificate . getInstance ( ( InputStream ) null ) ; fail ( "No expected CertificateException" ) ; } catch ( CertificateException e ) { } }
getinstance ( inputstream instream ) method testing .
