The Perl 5 package Test::Mock::LWP provides easy mocking of LWP packages: HTTP::Request, HTTP::Response, LWP and LWP::UserAgent.