I need to write unit test for some static void
methods with an unknown/unpredictable side effect. For example
public void doSth() {
try {
HttpPostUtil.sendRequest("abc", "xyz");
} catch(Exception ex) {
ex.printStackTrace();
}
}
HttpPostUtil
is in another jar file. It is out of my control and it will post the data to some web services . What is the testing methodology that we could do in this situation? (PowerMockito
is not allowed here :()