Added some basic unit tests

Change-Id: I3c2072a794427491c456a5890a927f6ac5c5921b
Unit tests galore

Change-Id: Icbc2dd1be78dc2f71f784330fa976e363d276fb2