Test if a given mutex is locked by the current thread in tests