fixing null pointer
fixing basic window event tests
adding test case for window