Adds substitute method to util and tests for it