@Test
public void testSplit__max() {

    // 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"});
    casesMap.put(",A,B", new String[]{"", "A"});
    casesMap.put(",A,B,", new String[]{"", "A"});
    casesMap.put(",,", new String[]{"", ""});
    casesMap.put("A,B", new String[]{"A", "B"});
    casesMap.put("A,", new String[]{"A", ""});
    casesMap.put(",", new String[]{"", ""});
    // sprawdzenie wynikow testu
    for (Map.Entry<String, String[]> e : casesMap.entrySet()) {
        String str = e.getKey();
        String[] expected = e.getValue();
        String[] result = EngineUtil.split(str, ',', 2);
        assertArrayEquals(expected, result);
    }
}