TST: move some Markov jump process code into separate functions and add a test