unit test for deadlock detection