mock-unit-tests: don't assume key is nul-terminated

Change-Id: I26d4414fedbd2b12b8f616fb2aaf7f5f07b14b78
Reviewed-on: http://review.couchbase.org/28114
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>