Fix compiler warnings in tests