我的应用程序中有一些方法可以发出http请求.有没有一种很好的方法来模拟网络故障和单元测试的错误响应?
java unit-testing http
http ×1
java ×1
unit-testing ×1