I have function
public void foo(final String s) {
if(StringUtils.isBlank(s) {//throw error}
//rest of the logic
}
and unit test
@Test(//expected exception)
public void testFooWithBlankString() {
ClassOfFoo.foo(StringUtils.EMPTY);
}
Is this correct? Should I create a blank variable like
BLANK = " "
and use that in unit test?