Added unit test for mask stack.