Unit test for switching layout