add test for encrypted device

It is actually already fixed, so I just add test to prevent regression in future.
to be honest I also do not know. I mock it because `GetDiskPartition` need initialized libstorage which cannot be done in testsuite, so I just mock its behavior.