??????????refundmanager?????????????Χ queryRefundFeeRange????????????????????????????????????????????????

????feeResultDO = confirmGoodsService.queryConfirmToSellerRefundFee(detailId);

???????????hsf???? ?????feeResultDO ??

???????hsf?????????mock???

?????????mock??ut ???? confirmGoodsService ???bean???????????????spring????????????????? ???????

????jmockit?????????????

@Injectable
private ConfirmGoodsService confirmGoodsService ;

???????Annotation???????е?????????????????????????????????bean???????????????

????????  @Tested  RefundManagerImpl refundManagerImpl = new RefundManagerImpl();

????????????????? @Tested   ??????????class ??

?????????г???????@Mocked??@NonStrict???

????????δ?????mock??????????mock??method????????????????

new Expectations(){
{
confirmGoodsService.queryConfirmToSellerRefundFee(anyLong);
result = feeResultDOmock;
times = 1;
}
} ;

????????

????result  ????????????????????????

????times  ???????????????????

?????????????????????????

???????????δ?????? ???????????mockup ???????£?

????????MockUp??????????mock?????mock??????????????????д???method??????????????????????????

?????????jmockit??????????

?????????????????????testcase??mock??????????

????Mockit.tearDownMocks();

??????????????????

????????????????mock???????????? any??