Sorry to respond like this to your questions about tests because I can't find the original post.
Oh well ...
What sort of tests did you have performed? How was it finally diagnosed? The fact that this went undiagnosed for so long is not reassuring, but nonetheless why I am starting to vigorously perform my own due diligence, since I feel my young age gets my symptoms overlooked as benign.
I found a website with a support forum and one man got bacterial pericarditis at age 23. So it's possible to have this at any age. It's more common in men than women.
Tests used to diagnose pericarditis are:
CBC where they specially look at your WBC (white blood cell count)
Chest X-ray to see if you hear is enlarged
Echocardiogram to view the lining of your heart and whether there is more fluid than normal. It's normal to have some.
MRI which shows slices of your heart and the pericardium
EKG to check for irregular heart rhythms (arrhythmias)
My primary doctor had known for months that I had an elevated ESR or sedimentation rate which is indicative of inflammation. I also had another test peformed which was off the scale. It was so high that the test result can only mean one thing infection or inflammation. Typically that test is used to determine whether you are at high risk for heart disease. At my elevated level it could no longer be used for the original purpose. I also had an elevated WBC count but not outside the normal range which was 4.5 to 10.8. Yet repeatedly mine was at the 10.7. With all three of those tests plus the chest pain, heart palpitations, and shortness of breath my primary should have done a more thorough investigation. Instead I became the investigator and the reseacher.
You can order the ESR, CBC and other blood tests online without a doctor's order at:
Be sure to thoroughly read their website to see if there's a testing facility near you.
The following website has a good description of pericarditis.
Mount Sinai - Cardiovascular Institute and Center for Cardiovascular Health