Fix mock serialization issues and add context to other Compliance methods.