Add some unit tests to Buffer.c