	@Test
	public void testReadIndefinite() throws Exception {

		byte[] data = new byte[] { (byte)0x80, (byte)0x80, 0x09, (byte)0x96, 0x02, 0x24, (byte)0x80,
				0x03, 0x00, (byte)0x80, 0x00, (byte)0xf2, (byte)0x81, 0x07, (byte)0x91, 0x13, 0x26,
				(byte)0x98, (byte)0x86, 0x03, (byte)0xf0, 0x00, 0x00 };
		
		AsnInputStream asnIs = new AsnInputStream(data);
		int length = asnIs.readLength();
		assertTrue(Tag.Indefinite_Length == length);
		byte[] indefiniteData = asnIs.readIndefinite();
		assertTrue(20 == indefiniteData.length);

		asnIs = new AsnInputStream(data);
		AsnInputStream asnIs2 = asnIs.readSequenceStream();
		assertTrue(20 == asnIs2.available());

		asnIs = new AsnInputStream(data);
		byte[] bfRes = asnIs.readSequence();
		assertTrue(20 == bfRes.length);

	}