*/
public void test_Decode_Encode() throws Exception {
// decoding byte array
for (int i = 0; i < validGeneralizedTimes.length; i++) {
DerInputStream in = new DerInputStream(
(byte[]) validGeneralizedTimes[i][1]);
assertEquals("Decoding array for " + validGeneralizedTimes[i][0],
validGeneralizedTimes[i][2], //expected
gtime.decode(in)); //decoded
}
// decoding input stream
for (int i = 0; i < validGeneralizedTimes.length; i++) {
DerInputStream in = new DerInputStream(new ByteArrayInputStream(
(byte[]) validGeneralizedTimes[i][1]));
assertEquals("Decoding stream for " + validGeneralizedTimes[i][0],
validGeneralizedTimes[i][2], //expected
gtime.decode(in)); //decoded
}