Improved test

* Combined two happy paths into one
* Test could not handle <nil> errors