Unit tests for _getStateDiff