[SD-1216] Adding function to validate state transition.