Inference of the magnetospheric plasma mass density from field line resonances: A test using a plasmasphere model