Written some new tests for window handler