Adds tests for valid and invalid inputs