complete State class and write some elementary test cases