Validating astrophysical simulation codes