unit test for value iteration