Add unit test for Device
Reviewers: stikonas, cjlcarvalho
Reviewed By: stikonas
Differential Revision: https://phabricator.kde.org/D22629