Add a functional test for this.