Order statistics in goodness-of-fit testing