Add unit tests for issue #35