you asked how the iPhone battery sitting idle for 2 years will effect the battery, following it with your statement that battery tend to lose some life if they just sit idle. Seems like you answered your own questions.
Now to find out how your iPhone battery is doing, your only option it to start using it and see how it goes.
one thing i recommend is that once you setup your iPhone, charge the iPhone to 100% and then drain the heck out of the battery to 0% when it shuts off. Then plug it into the wall to charge, turn it off and do not touch it for 5 hours. Let it charge to 100%. Give it 5 hours so it hits 100%. This will condiiton your battery and calibrate the meter. if you ever have battery issues, just repeat the conditioning process. And give it a few days of use and your battery will behave better.