Added a test for wait() and notify()