test illegal state case in cook operator.