statePattern tests