I'm not a battery engineer, nor a battery tester, so I cannot comment on what a proper test would be, and if that would include testing the battery for extended period of time prior to releasing them to market.
But you don't need to be a battery engineer to understand statistics. If these batteries are dying early, then either Apple didn't do enough testing, they did and ignored the results.