Refactor tests and parseResult tests