@Test
public void testSplit() {

    // konfiguracja testu (key = string, value = oczekiwany wynik splitowania)
    Map<String, String[]> casesMap = new LinkedHashMap<String, String[]>();
    casesMap.put("A,B,C", new String[]{"A", "B", "C"});
    casesMap.put(",A,B", new String[]{"", "A", "B"});
    casesMap.put(",A,B,", new String[]{"", "A", "B", ""});
    casesMap.put(",,", new String[]{"", "", ""});
    casesMap.put(" ,, ", new String[]{" ", "", " "});
    casesMap.put("A,,B,,C,", new String[]{"A", "", "B", "", "C", ""});
    casesMap.put("AA,BB", new String[]{"AA", "BB"});
    casesMap.put(",AA,BB", new String[]{"", "AA", "BB"});
    casesMap.put(",AA,BB,", new String[]{"", "AA", "BB", ""});
    casesMap.put("AA,,BB", new String[]{"AA", "", "BB"});
    // sprawdzenie wynikow testu
    for (Map.Entry<String, String[]> e : casesMap.entrySet()) {
        String str = e.getKey();
        String[] expected = e.getValue();
        String[] result = EngineUtil.split(str, ',');
        assertArrayEquals(expected, result);
    }
}