QA: Simplify code inside MethodDeclarationTest