Unified common unit test code for testing joins.