Replaced the mock_Resource in Gateway with the actual Resource and fixed the test cases