Germany formed alliances because Prussian Chancellor Bismarck felt that German/Prussian honour was being offended.
So Prussian army went to war with France on 19 July 1870 and won the war on 10 May 1871.This war became famous as Franco-Prussian war in history won by Prussia and led to unification of Germany.