fixed bug on Method constructor and added tests
Merge pull request #17 from titomiguelcosta/master

fixed bug on Method constructor and added tests