Implement tests for State

Tests have been added that verify the correct behavior of the State's public methods.