Added tests for ElectStateContext