Fix wrong type spec for priority
Add simple statem tests