probability – Test the sequence is a Markov chain

Assume I observe a sequence of measurements $(x_1, …, x_n)$, $x_i in {0, 1, 2}$. I have a hypothesis that this sequence is a Markov chain with the emission matrix $P = begin{bmatrix} p_{00} & p_{01} & p_{02} \ p_{10} & p_{11} & p_{12} \ p_{20} & p_{21} & p_{22} \ end{bmatrix}$. How can I test this hypothesis?