我用的是弹簧靴和摩托。我有一个类,即BDSRequest,在Junit类中,我使用了@Spy和@InjectMocks注释。但是,在调用Junits中的rest服务时,我得到响应(bdsCustomerHoldings)为null,断言失败。如何使用像mockito.when(restTemplate.postForObject(Constants.BDS_REST_URL,bdsRequest、BDSCustomerHoldings.class这样的外部模拟rest模板来测试rest调用?class B