for (int i = 0; i < validBitstring.length; i++) {
DerInputStream in = new DerInputStream(new ByteArrayInputStream(
(byte[]) validBitstring[i][1]));
BitString expected = (BitString) validBitstring[i][0];
BitString decoded = (BitString) asn1.decode(in);
assertEquals("Testcase: " + i, expected.unusedBits,
decoded.unusedBits);
assertTrue("Testcase: " + i, Arrays.equals(expected.bytes,