Add unit test for selectionchange