如果类的构造函数受到保护,当我做测试用例时,我可以做些什么来使用 EasyMock 或 PowerMock 构造一个对象。这是我的源代码:
protected TibOperationProxy(SAPApplication sdkApp, String classRef, String getOperationName, String rpcRef, SAPReqRespImpl sapClient)
throws MException {
super(sdkApp, classRef, getOperationName, rpcRef);
this.sdkApp = sdkApp;
this.client = sapClient;
}