Added test for update-potentials function.