Port unit tests

* Port unit tests from CBL Android as of v1.0.0.