Added some assertions
Added more tests for the device API