Issue #334: Added tests.