My macbook air died one month out of the yearlong warranty. In their troubleshooting at the apple store they managed to wipe the device and still couldn't breath life into it or figure out what happened. >$400 flat rate repair and they didn't even offer me a loaner in the mean time while the computer was mailed off. I would think apple could compete on customer service with the shade tree mechanic and their loaner car but I guess not.
I had the opposite experience. My macbook air battery was dying, so I paid the $129 to replace it. When I got the computer back, it wouldn't charge. So, they replaced the motherboard. I got it back and it still wouldn't charge - so they handed me a brand-new next-gen macbook air. Inconvenient, sure, but exceeded my expectations. I've found they've been generous with battery replacements.
I've found the opposite. Before that computer bricked itself I noticed capacity was fading fast. Apparently apples threshold was if you are under 85% within a year of ownership you have a defective battery, according to the customer service agent I was chatting with. So they had me open up system profiler and we confirmed my battery was well within threshold for replacement, and they set me up with an appointment. I took it to the apple store and told them what the Apple customer service representative told me about the battery being defective. They ended up running a battery test using their internal tooling and surprise surprise, it turned out a different capacity number than system profiler said I had, and it happened to be just above the threshold for replacement. 1 year of use for full time work should not mean losing 15% of your battery capacity, but evidently according to apple this was in spec.
This is why I either buy Applecare or equivalent (depending on product) if it's mission critical, or buy using a card that extends the warranty by at least one year, such as the Chase Sapphire cards.
Charge it to a credit card and then the charge will get reversed when you return the item, and you won't have to worry about it. Just providing a solution here that works easily (not that the problem and solution need to exist).