Created unit test for xorBuffer() function