Added tests for doublelock and wait-completion