Strengthen tests by checking the correct error code is returned
Fixed according to Nicola's review comments
Merge pull request #42 from larshesel/vp

Strengthen tests by checking the correct error code is returned