Resolve #202 and add a unit test and acceptance test.

Resolves #202