Add test helper in order to simplify test cases.