TST: Prevent random integer during unit test from exceeding bounds.