add test for encrypted device

It is actually already fixed, so I just add test to prevent regression in future.
NTH: We could probably use Factory for this... (next time)