Add test for a non-empty write buffer.