Added tests for getState