fixed unittests for device