added testcase for patch
added tests for patch