Fix some unused functions in tests. Patch by Adam Johnson.