in the case notify() comes before wait(), the test case was hanging