これは私が、これは私のテストクラスで私の他の方法であるオーバーライド
@AdminAccessOnly
@Repository
public class TenResImpl extends TenAbstractResImpl implements TenIdRes {
private Invocation request;
protected void messageSend(String iD) {
Client client = utils.createClient();
WebTarget webTarget = client.target(location).path("/testurl/" + tenantId);
Invocation.Builder requestBuilder = webTarget.request();
Response response = null;
response = sendRequest(); //here I call the method!!!!!!!
if (response.getStatusInfo().getFamily() != Status.Family.SUCCESSFUL) {
// do something
} else {
//do something
}
}
protected Response sendRequest() {
return request.invoke(); // here is the method which should be over written !!!!
}
}
をテストしたかった私のコードでは動作しません。彼は私のテストクラスに行くのではなく、クラスTenResImplにあるメソッドSendRequest()にジャンプします....私は間違って何をしていますか?アクセスの可視性は両方で保護されており、両方が同じパッケージに入っています
どこに電話をかけることができますか? – Mureinik
はい私は上記のコメントをいくつか追加しました – Nali
あなたのクラスのインスタンス化を教えてもらえますか? –