Added test for total-value function