@Test
public void testGroupByTitle() {

    final List<CompositeColumn<? extends BaseColumn>> conditions = new ArrayList<CompositeColumn<? extends BaseColumn>>() {{
        add(compositeColumn1);
        add(compositeColumn2);
        add(compositeColumn3);
    }};
    final String title1 = "title1";
    final String title2 = "title2";
    doReturn(title1).when(compositeColumn1).getHeader();
    doReturn(title2).when(compositeColumn2).getHeader();
    doReturn(title1).when(compositeColumn3).getHeader();
    final Map<String, List<BaseColumn>> columnGroups = presenter.groupByTitle(conditions);
    final List<BaseColumn> actualTitle1List = columnGroups.get(title1);
    final List<BaseColumn> actualTitle2List = columnGroups.get(title2);
    final ArrayList<CompositeColumn<? extends BaseColumn>> expectedTitle1List = new ArrayList<CompositeColumn<? extends BaseColumn>>() {{
        add(compositeColumn1);
        add(compositeColumn3);
    }};
    final ArrayList<CompositeColumn<? extends BaseColumn>> expectedTitle2List = new ArrayList<CompositeColumn<? extends BaseColumn>>() {{
        add(compositeColumn2);
    }};
    assertEquals(2, columnGroups.size());
    assertEquals(actualTitle1List, expectedTitle1List);
    assertEquals(actualTitle2List, expectedTitle2List);
}