I am trying to write unit test cases for my service file. There is a function linkDevice that joins 2 tables user and device and returns the object. I check if the device is alr