A generalized equivalent circuit applied to a tunable sapphire-loaded superconducting cavity