See https://code.google.com/p/cmockery/