私は機能を持っています
public void foo(final String s) {
if(StringUtils.isBlank(s) {//throw error}
//rest of the logic
}
および単体テスト
@Test(//expected exception)
public void testFooWithBlankString() {
ClassOfFoo.foo(StringUtils.EMPTY);
}
これは正しいです?次のような空の変数を作成する必要がありますか
BLANK = " "
ユニットテストでそれを使用しますか?