private void assertWriteLittleEndian64(byte[] data,long value) throws Exception {
  ByteArrayOutputStream rawOutput=new ByteArrayOutputStream();
  CodedOutputStream output=CodedOutputStream.newInstance(rawOutput);
  output.writeRawLittleEndian64(value);
  output.flush();
  assertEqualBytes(data,rawOutput.toByteArray());
  for (int blockSize=1; blockSize <= 16; blockSize*=2) {
    rawOutput=new ByteArrayOutputStream();
    output=CodedOutputStream.newInstance(rawOutput,blockSize);
    output.writeRawLittleEndian64(value);
    output.flush();
    assertEqualBytes(data,rawOutput.toByteArray());
  }
}

private void assertWriteLittleEndian64 ( byte [ ] data , long value ) throws Exception { ByteArrayOutputStream rawOutput = new ByteArrayOutputStream ( ) ; CodedOutputStream output = CodedOutputStream . newInstance ( rawOutput ) ; output . writeRawLittleEndian64 ( value ) ; output . flush ( ) ; assertEqualBytes ( data , rawOutput . toByteArray ( ) ) ; for ( int blockSize = 1 ; blockSize <= 16 ; blockSize *= 2 ) { rawOutput = new ByteArrayOutputStream ( ) ; output = CodedOutputStream . newInstance ( rawOutput , blockSize ) ; output . writeRawLittleEndian64 ( value ) ; output . flush ( ) ; assertEqualBytes ( data , rawOutput . toByteArray ( ) ) ; } }
parses the given bytes using writerawlittleendian64 ( ) and checks that the result matches the given value .
