Methods for testing leakage of energy storage charging piles