Fix warnings in test code