Buffer tests rewritten