@Test public void testTextareaChoiceListProvider_defaultChoice() { // a value { String defaultChoice = "b"; TextareaChoiceListProvider target = new TextareaChoiceListProvider("a\nb\nc", defaultChoice, false, null); assertEquals("a value", defaultChoice, target.getDefaultChoice()); } // null { String defaultChoice = null; TextareaChoiceListProvider target = new TextareaChoiceListProvider("a\nb\nc", defaultChoice, false, null); assertEquals("null", defaultChoice, target.getDefaultChoice()); } // empty { String defaultChoice = ""; TextareaChoiceListProvider target = new TextareaChoiceListProvider("a\nb\nc", defaultChoice, false, null); assertEquals("empty", defaultChoice, target.getDefaultChoice()); } // blank { String defaultChoice = " "; TextareaChoiceListProvider target = new TextareaChoiceListProvider("a\nb\nc", defaultChoice, false, null); assertEquals("blank", defaultChoice, target.getDefaultChoice()); } }