Unit tests for bucket logic.