High-voltage capacitor testing