Unit tests for the device lock