state machin helper state machin helper state machin helper control smh mock 