refactoring: move modes to helper class
[tests] form type test