Add unit tests for PR #31