I need to write tests to check whether correct patches are produced, based on the original reference code from flips.