added test for setMethod