Add StateEditorTest
Fix integer overflow in StateEditor