How to figure out whether vacuum or air is inside a bottle? I'm trying to figure out how air tight the sealing of a bottle is. A friend is crafting privately beer and is using a machine like this (though the depicted one below is much more advanced..):

For specific purposes, he sealed a bottle with 40 °C plant oil up to the edge. Means, all the space was filled with oil. After cooling down, the height level of the oil went down, like half a centimeter, or so.
We're wondering now: Is this vacuum or is it air? Do you know a convenient way to determine this?
 A: Beware that plant oils have more complicated chemistry than a simple molecule like water, so the value of any technique you use needs to be tempered by the amount of weirdness you are willing/able/expecting to deal with. Olive oil has a thermal expansion coefficient of about $0.7\times10^{-3}\,\rm K^{-1}
$, so a volume reduction of 1% after a 20K temperature change is reasonable. However, organic oils usually contain dissolved gases, so the space above the oil in your bottle may not be a vacuum even if no external air has entered.
For food safety, you should expect your seals to leak, and plan accordingly. Canned or jarred foods, which should have low pressure inside the container, are generally sold with pressure gauges installed in the lids of the jars. In the US these are low-tech two-state pressure gauges, usually labeled “do not purchase if button is up.” Beer and wine (especially sparkling wine) are bottled and stored at high pressure, thanks to carbon dioxide coming out of solution. Those bottles should expel gas when opened. Soda cans do the same thing: an intact soda can goes “fssst” when you open it.
To test the bubble in your bottle of oil, first estimate the volume of the bubble. If you have a similar bottle, fill it to the bottom of the bubble, then measure how much liquid it takes to fill the rest of the way up.
Next, fill a sink or tub with water, and put an inverted clear bowl in the water, so that it has no trapped bubbles. Open your bottle underneath this underwater inverted bowl, so that the bowl traps any escaping bubble. If the escaped bubble is smaller than the bubble in the sealed bottle, the bottle was sealed at low pressure. If the escaped bubble is larger, the bottle was at high pressure. For a more precise measurement, you might transfer the captured bubble underwater to some measuring cup or cylinder; that technique might want practice before you break the seal on your bottle of interest.
For that matter, you could just open the bottle with its neck underwater and pointed down, so that the bubble is trapped floating at the base of the bottle. As soon as the seal is broken, water and oil will flow to equalize the pressure. An atmospheric-pressure bubble, as from a bad leak, would not change size once this flow is allowed. A low-pressure bubble, as from outgassing within a sealed system, would shrink. A “vacuum” bubble is the lower limit of “low pressure”; a vacuum bubble would just disappear once there was fluid to pull into the void,
A: Why not open one bottle and listen for air rushing in?
If there is air rushing in, then the pressure in the gap is lower than atmospheric pressure, so you have a (partial) vacuum.
A: Take a syringe and pull the plunger so a small amount of air is inside.  Carefully insert the needle through the cork into the void.
If the plunger does not move (and if you can pull the plunger out without difficulty), then the void is not vacuum.
A: After filling, put it on a sensitive balance. Or, if you don't have a sensitive balance, put many bottles on a not so sensitive balance. Wait and see whether the weight changes (-> air) or not.
A: Oh, I have another way too, this I think is how I would actually do it because it preserves the seal and the oil in the bottle (assuming it is sealed properly), which I would think is something you would like to do. So, seal your bottle with the warm oil. Put it completely underwater. Wait. Again, the oil will cool and contract. Now, if the seal is intact, you will get a "vacuum" volume in the bottle which looks like a bubble. But if the seal is not intact, water will rush in, and you won't form a bubble in the bottle at all. Thus, simply by looking, you know whether your seal is tight or leaky: Bubble means tight, no bubble means you got water in and your seal is broken.
