add test for encrypted device

It is actually already fixed, so I just add test to prevent regression in future.
That's true