China's diplomats have every reason to feel satisfied with their handling of the Ukraine crisis.
On the one hand, China expressed its support for Ukraine's territorial integrity, an implicit rebuke to Russia, which seized Ukraine's Crimea region.
But at the same time, Beijing has abstained from all anti-Russian votes at the United Nations, and let it be known that it won't be supporting anti-Russian sanctions.
Beijing's determination to have its cake and eat it, to be caught neither on Russia's side nor on the West's, is based on the assumption that whichever way the stand-off over Ukraine is resolved, China stands to gain from the crisis.
Yet, such assumptions are fundamentally misconceived. For the Ukraine episode is a misfortune for Asia as a whole. And China may soon discover that, far from being an indirect beneficiary, the crisis in far-away Ukraine will confront Beijing with new and costly security challenges.
It is easy to see why, at least in the short term, China may benefit from events in Ukraine. An isolated Russia subjected to Western sanctions will be far more willing to sell oil, gas and weapons to China on preferential terms; Mr Igor Sechin, Russian President Vladimir Putin's top energy boss, admitted as much in comments to the media last week.
Can China copy the Russian model?
A United States concerned with handling a European crisis will have far less time to deal with its "pivot" to Asia. And, although nobody in China suggests that Beijing should copy the Russian model of grabbing territory, the fact that the Russian action has met with no serious reaction from the US must serve as an inspiration for Chinese strategists who hope that their country may one day be able to resolve its own territorial disputes in a similar manner.
For if the Russians can subdue Crimea - a relatively large territory with two million inhabitants - in a few days and without firing a shot in anger, why can't China do the same to a few strings of uninhabited rocks?