这个是使用PowerMockito,因为只有他能mock static方法. 先来代码 ... mockStatic(JdbcClient.class); Mockito.when(JdbcClient.sendRequest(any())).
確定! 回上一頁