add unit test for widget manager