TestMapping completed, optimized testLegend