No, don't take crap like that. If you eat properly and get enough rest, you won't need to jack yourself up with energy drinks.
Go easy on the complex carbs (stuff with grains) while you're studying and on test day. Boost your proteins and fruits, and drink water. Studies have shown that if you're dehydrated, it can cause fuzzy thinking. If you get yourself used to drinking a lot more water than you usually do, you can drink a bit more than usual during test breaks without having to pee the whole time. When I dramatically increased my water intake for health reasons, I initially ran to the bathroom a lot, but then got used to it and it settled down. TMI, I know, but it works.
For the food boost, I especially like tuna fish sandwiches or egg salad sandwich, even chicken salad. Those don't keep overly well, so if you bring one for a break, put a couple of ice packs in an insulated bag! Another option is peanut butter and jelly...it has the slight sugar boost from the jelly, the complex carbs to sustain your blood sugar after that boost, the protein from the peanut butter to boost your brain, and the fat from the peanut butter to keep you from being hungry. Follow any of those sandwiches with an apple and some carrot sticks or celery sticks (the latter are full of water, so cut back on water intake if you nibble on those). Or have some yogurt or cottage cheese and a banana or orange. A really quick snack is yogurt or cottage cheese and a granola bar. Oh, and eat eggs, one piece of toast, maybe two slices of bacon and a small piece of fruit for breakfast on test day. If you don't normally have caffeine in the morning, don't do it on test day. Don't try anything new on test day. Test it out while you're prepping.
In general, I would stay away from protein bars. They can cause some serious tummy distress, and if you're distracted by gas or the need to run to the bathroom, you'll be hating life. I haven't tried the 5-hour energy drink but it strikes me as a marketing gimmick. If you need that kind of boost, honestly, an apple and a glass of water will give it to you. When I hit the 3 pm crash time at work, and am starting to just pass out at my desk, I always perk up after eating an apple and will be zipping around and very productive. No crash afterward, either. Those things are magic.
Gatorade is ok in small doses, but because of the electrolytes, if you drink it when you're not physically active, you will seriously get bloated. A few sips during breaks would be sufficient.
Hope this helps! As I said, eat the right stuff and you won't need the energy booster drinks. And stay away from Red Bull whatever you do. Not the kind of flying you should do on test day!!!