server side unit test for registerNewUser when validation fails