What I expected to happen was...:
When I ate the apple, 2 hearts would be restored, and I will be given 2 extra from absorption.
What actually happened was...:
Watch this video for a more information. (sorry about bad audio quality, my mic wasn't plugged in all the way).
Instead, I healed 2 hearts, and I got 2 extra hearts from absorption, but then I lost the two hearts I healed.
Steps to Reproduce:
1. Type /effect @p 21 999999 0
2. Spawn a normal golden apple
3. Go into survival mode
4. Eat the golden apple
5. Watch as health regens, and then you lose it.