Hi amar ;
welcome to HealthcareMagic
These are two different problems one of acidity & gas in stomach and second of testes.For acidity you can take a antacid
to relieve the acidity or if required it will help but if it is continuous you should take a proper medicine from a doctor.Also for the pain of testes please consult a doctor as you need to get examined to find the cause of pain whether it is due to a varicocele;hydrocele
or some other problem .So better consult a doctor & he will help you solve both problems.