In the electrochemical cells of a battery-powered electric circuit, the chemical energy is used to do work on a positive test charge to move it from the low potential terminal to the high potential terminal. Chemical energy is transformed into electric potential energy within the internal circuit (i.e., the battery). Electrons try to move from negative (lower potential) to positive (higher potential) which means nothing but conventional current ( opposite to the direction of electron flow) flows from higher potential "A" to lower potential "B".