question: private void assertWriteVarint ( byte [ ] data , long value ) throws Exception { if ( ( value > > > 32 ) == 0 ) { ByteArrayOutputStream rawOutput = new ByteArrayOutputStream ( ) ; CodedOutputStream output = CodedOutputStream . newInstance ( rawOutput ) ; output . writeRawVarint32 ( ( int ) value ) ; output . flush ( ) ; assertEqualBytes ( data , rawOutput . toByteArray ( ) ) ; assertEquals ( data . length , CodedOutputStream . computeRawVarint32Size ( ( int ) value ) ) ; } { ByteArrayOutputStream rawOutput = new ByteArrayOutputStream ( ) ; CodedOutputStream output = CodedOutputStream . newInstance ( rawOutput ) ; output . writeRawVarint64 ( value ) ; output . flush ( ) ; assertEqualBytes ( data , rawOutput . toByteArray ( ) ) ; assertEquals ( data . length , CodedOutputStream . computeRawVarint64Size ( value ) ) ; } for ( int blockSize = 1 ; blockSize <= 16 ; blockSize *= 2 ) { if ( ( value > > > 32 ) == 0 ) { ByteArrayOutputStream rawOutput = new ByteArrayOutputStream ( ) ; CodedOutputStream output = CodedOutputStream . newInstance ( rawOutput , blockSize ) ; output . writeRawVarint32 ( ( int ) value ) ; output . flush ( ) ; assertEqualBytes ( data , rawOutput . toByteArray ( ) ) ; } { ByteArrayOutputStream rawOutput = new ByteArrayOutputStream ( ) ; CodedOutputStream output = CodedOutputStream . newInstance ( rawOutput , blockSize ) ; output . writeRawVarint64 ( value ) ; output . flush ( ) ; assertEqualBytes ( data , rawOutput . toByteArray ( ) ) ; } } }
target:  Writes the given value using writeRawVarint32() and writeRawVarint64() and checks that the result matches the given bytes.