private void readAndRunTest(
     TestDataDescription<?> description, boolean optimizedGenerics, Input in)
     throws FileNotFoundException {
   TestData actual = kryo.readObject(in, description.testDataClass());
   roundTrip(
       optimizedGenerics ? description.lengthOptGenerics : description.lengthNonOptGenerics,
       optimizedGenerics
           ? description.unsafeLengthOptGenerics
           : description.unsafeLengthNonOptGenerics,
       actual);
   try {
     assertReflectionEquals(actual, description.testData);
   } catch (AssertionError e) {
     Log.info(
         "Serialization format is broken, please check "
             + getClass().getSimpleName()
             + "'s class doc to see"
             + " what this means and how to proceed.");
     throw e;
   }
 }