If there is a method of a class like:
public String createA(String message) {
. . .
String sec = MDI.check(message, ..., ...);
if sec == null throw . . .
return something;
}
What is the way to test createA(message)
and mock, stub, ... the call to MDI
. I mean, I want to check in the test that the call in createA
to MDI.check(...)
returns something I want.
@Test
public void testcreateA() {
}