It's all perfectly rational. They are calibrating the limits and contours of our responses in various situations. We were not going to start an all out war over the spy plane. The military buildup with respect to Taiwan goes hand-in-hand with their overtures to the Nationalist party (carrot and stick). The North Korea situation is a classic proxy antagonist. They will keep the leash on their NK bulldog, but allow it to snarl away, keeping us off balance and distracted. The anti-Japanese demonstrations were completely effective in moving forward Chinese interests.
If Japan or Taiwan detonates an a-bomb, everyone will know that they "miscalculated."