Unit test for NCBC-667

Change-Id: I98719f83d4d4558f5ee8fcb9d91c1754274048a8
Reviewed-on: http://review.couchbase.org/41915
Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>