Goodness-of-Fit Tests for Inhomogeneous Random Graphs