New Zealand occupied the German protectorate of Western Samoa at the outbreak of World War I in 1914 .