Added GetExpiresIn command and improved unit tests.

Fixes #4