How to check if a map $X\to M(X)$ is measurable? Let $X$ be a compact metric space and $M(X)$ be the set of all the finite measures on the Borel $\sigma$-algebra of $X$.
By the Riesz representation theorem, we know that the map $M(X)\to C(X)^*$ defined as $\mu\mapsto (f\mapsto \int f\ d\mu)$ is injective and its image is the set of all bounded linear maps $F:C(X)\to \mathbf R$ which are positive, that is, those $F$ such that $Ff\geq 0$ whenever $f\geq 0$.
Equipping $C(X)^*$ with the weak* topology, we get a topology on $M(X)$ and hence a $\sigma$-algebra on $M(X)$.
On $X$ we also have the Borel $\sigma$-algebra.

Question. Suppose we have a map $\mu:X\to M(X)$, $x\mapsto \mu_x$.
  Is is true that $\mu$ is a measurable map if for each $f\in C(X)$ the map $X\to \mathbf R$, $x\mapsto \int_X f\ d\mu_x$ is measurable?

Or is there some other convenient criterion to check the measurability of a map $X\to M(X)$?
 A: $\newcommand{\set}[1]{\{#1\}}$
$\newcommand{\vp}{\varphi}$
$\newcommand{\mc}{\mathcal}$
$\newcommand{\R}{\mathbf R}$
$\newcommand{\mr}{\mathscr}$
WE answer the question above in the affirmative. The only difference is that I will be proving the result with $\mr P(X)$, the space of all the probability measures on $X$, instead of $M(X)$, which doesn't make much difference.

Lemma.
  Let $Z$ be a set and $f_\alpha:Z\to Z_\alpha$ be a collection of continuous maps into topological spaces $Z_\alpha$ indexed by a set $J$.
  Endow $Z$ with the initial topology with respect to this collection.
  Then for any measurable space $(Y, \mc Y)$, a map $\vp:Y\to Z$ is Borel measurable if and only if each composite $f_\alpha\circ \vp$ is Borel measurable.

Proof.
We do the less trivial direction.
Assume that each composite $f_\alpha\circ \vp$ is measurable.
Note that the collection
$$
\mc C=\bigcup_{\alpha\in J} \set{f_\alpha^{-1}(W):\ W\text{ open in } Z_\alpha}
$$
is a subbasis for the topology on $Z$.
Let $O=f_\alpha^{-1}(W)$ be an arbitrary member of $\mc C$, where $W$ is an open set in $Z_\alpha$.
But then $\vp^{-1}(O)=(f_\alpha\circ \vp)^{-1}(W)$ is a measurable subset of $Y$.
So we see that each member of $\mc C$ pulls back under $\vp$ to a measurable subset of $Y$.
Thus $\vp$ is measurable.
$\blacksquare$

Corollary.
  Let $X$ be a compact metric space and $(Y, \mc Y)$ be a measurable space.
  Then a map $\vp:Y\to \mr P(X)$ is Borel measurable if and only if for each continuous function $f:X\to \R$ we have that the map $y\mapsto \int_X f\ d\vp_y:Y\to \R$ is Borel measurable.

