There are many ways to find out if a molecule has an ester group. Infrared spectroscopy gives very sharp signals, which are different from other carbonyls. Carbon NMR spectroscopy has similar characteristics.