Basically copy-and-paste of the Run 2 EDM unit test. More checks can be added, but this already picks up a few basic errors.
cc @bernius @tamartin