HIVE-4082: Refactor tests