Germany beat Pakistan to take Champions Trophy