Added some tests to the "merge-Kostas-code" branch

I hope these are correct. The only one I did not add yet is for `passMessages`. I'm not sure what that function does exactly.