Tests for Bin functions