updated test for widget manager
added test for factory method