It wasn't an obvious example since Germany had just defeated France in the Franco-Prussian War not long before and was engaged in an arms race with Britain to try to achieve naval superiority. Even if you discount the Archduke shooting the reality was closer to the opposite of what you stated - Germany was willing to enter the war because they felt they could WIN the war not because they felt they were in an "unwinnable" situation. Hell, if anything the Germans thought they had an near unbeatable technological advantage of their General Staff (innovative at the time of the earlier war), logistics mobilization systems, dreadnought naval vessels, and the Schlieffen Plan.