Add in test for patching library function