Added a test utility for building invocation records.