added more tests to the query input
minor refactor of query input
update tests to use es service, mock validateQuery