Some more unit tests

Change-Id: Ib7c931e51ac2413577a3a05cb367af6b9ca9e183