HIVE-7068 Move some test classes. Consolidated implementation. Added a simple test.