Test for apply a patch