Added tests for Request Factory and corrected tests as per PR