Write unit test for this.