(long )Integer.MAX_VALUE + 1,
(long )Math.pow(2, 62) - 1,
};
for (long value : values) {
Length a = new Length(value);
int[] length = new int[1];
Length b = Length.fromByteArray(a.toByteArray(), 0, length);
assertEquals(a, b);
ByteArrayOutputStream out = new ByteArrayOutputStream();
a.toStream(out);
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
Length c = Length.fromStream(in, length);
assertEquals(a, c);
}
}