Resolve #202 and add a unit test and acceptance test.
Merge pull request #203 from dnephin/release_0.5.2

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