Fix warnings in tests