Moved tests parts in a testUtils file, and added test to check the typing of expressions inside a method