Positivity Criterion for $C^*$-Algebras