Added unit test for input validation
Inputs are validated fixes #1