Here is my class. I need to test this parametrized constructor A(String param)
.
public class A {
private String superParam;
private Integer value;
public A(String param) {
this();
append(param);
}
public A() {
this.value = 100;
}
public void append(String additionalParam) {
this.superParam.concat(additionalParam);
}
}
Now I'm struggling with this()
invocation. I would be appriciated for any suggestions.
UPD:
I also want to know how can I mock a method during constructor invocation when the object isn't created?