Add unit test hook and first unit test.

Change-Id: I4b8c505ffdf8f9e6f905b323f096e163743ad342