Add unit tests

Change-Id: I0a5895ccef83589c8f8d9548c4d9283c97db12f9