@Test
public void testFormatItemList() {

    DisplayerSettings departmentList = DisplayerSettingsFactory.newSelectorSettings()
            .dataset(EXPENSES)
            .group(COLUMN_DEPARTMENT)
            .column(COLUMN_DEPARTMENT)
            .column(COLUMN_ID, AggregateFunctionType.COUNT)
            .filterOn(false, true, true)
            .multiple(true)
            .width(90)
            .buildSettings();
    SelectorDropDownDisplayer presenter = createSelectorDisplayer(departmentList);
    String result = presenter.formatItemList(Arrays.asList("Sales", "Management", "IT"), 200);
    assertEquals(result, "Sales, Management, IT ");
    result = presenter.formatItemList(Arrays.asList("Sales", "Management", "IT"));
    assertEquals(result, "Sales, Management, IT ");
    result = presenter.formatItemList(Arrays.asList("Sales", "Management", "IT"), 150);
    assertEquals(result, "Sales, Managemen...");
    result = presenter.formatItemList(Arrays.asList("Sales", "Management", "IT"), 130);
    assertEquals(result, "Sales, Managem...");
    result = presenter.formatItemList(Arrays.asList("Sales", "Management", "IT"), 60);
    assertEquals(result, "Sales ...");
    result = presenter.formatItemList(Arrays.asList("Sales", "Management", "IT"), 10);
    assertEquals(result, "S...");
}