#4 fix test by pressing enter on window.
#4 fix test by checking popup trigger also in mousePressed().
#4 fix NPE in tests by setting the window field before any other thread
might access it.

Previously the beforeShowingWindow() method could access the window
field before this was set.
#4 fix test by adding all wheel rotation events instead of just setting
the value of the current event.
#4 fix test by giving window a minimum size.