ByteArrayOutputStream bOut = new ByteArrayOutputStream();
BerSequenceGenerator seqGen = new BerSequenceGenerator(bOut, 1, true);
seqGen.addObject(new Asn1Integer(BigInteger.valueOf(0)));
seqGen.addObject(new Asn1ObjectIdentifier("1.1"));
seqGen.close();
assertTrue("explicit BER tag writing test failed.", Arrays.equals(berExpTagSeqData, bOut.toByteArray()));
}