Add a test for the legend element