Well it certainly was a setup:If you're looking for a fight, chances are you will find it.
...The machinery of state had drained the body of Franz Ferdinand of its diplomatic usefulness, and Austria-Hungary, encouraged by Germany, carefully determined the next stage in the tragedy of what many would later describe as ‘inevitable’ and ‘unstoppable’ events. On the contrary, the leaders of the Austrian and German Governments, careless of the risks, determined the stations of the Third Balkan War every step of the way.
Nobody wanted a European war, they later claimed. Yet their outlook and policies made a continental war likely, and varied according to hidden agendas, flaring up and dying down with terrific and unexpected force. Germany’s civilian leaders (none of them voted in despite Germany's vaunted 'male suffrage') expected Vienna, at this stage, to confine the conflict to a local stoush with Serbia. The Prussian generals paid lip-service to this policy. ‘Austria must beat the Serbs,’ Moltke, the chief of the General Staff, told the German military attaché in Vienna on 13 July, ‘and then make peace quickly, demanding an Austro-Serbian alliance as the sole condition.’ At other times, however, Moltke spoke by turns zealously or resignedly of a European catastrophe, a chance to take the war to Russia, enact the Schlieffen Plan and settle Germany’s great reckoning with the world.
Germany did not wish to seem the belligerent, however. Berlin delicately removed itself from Vienna’s deliberations – refusing to help draft the ultimatum, for example – and stood back to watch the process it had started. Ministers were instructed to affect surprise at the harshness of the document, when made public.
Hans von Schoen, Bavarian counsellor in Berlin, advised:
The administration will immediately upon the presentation of the Austrian note at Belgrade, initiate diplomatic action with the Powers in the interests of the localization of the war. It will claim that the Austrian action has been just as much of a surprise to it as to the other Powers, pointing out the fact that the Kaiser is on his northern journey and that the Chief of the General Staff and the Prussian Minister for War are away on leave of absence.
Source: Ham, Paul. 1914: The Year the World Ended