Working on unit tests for deadlock issue