Hypotheses testing on infinite random graphs