Validate inputs to save method
Validate inputs to test method
Implemented saving of query