Added unit tests for device module