test for legend