Osmolality can be measured using a sample of blood or urine. The test involves an osmometer, which measures the freezing point depression of the sample. This test is particularly useful in diagnosing and managing dehydration, overhydration, and other conditions related to fluid imbalance in neonates.