add unit tests for read buffer comparison