Fix fuzzer random boundary functions; add tests for fuzzer