@Test
public void testSplit2() {

    // konfiguracja testu (key = string, value = oczekiwany wynik splitowania)
    Map<String, String[]> casesMap = new LinkedHashMap<String, String[]>();
    casesMap.put("A;B", new String[]{"A", "B"});
    casesMap.put("AA;BB", new String[]{"AA", "BB"});
    casesMap.put(";B", new String[]{"", "B"});
    casesMap.put(";BB", new String[]{"", "BB"});
    casesMap.put("A;", new String[]{"A", ""});
    casesMap.put("AA;", new String[]{"AA", ""});
    casesMap.put(";", new String[]{"", ""});
    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.split2(str, ';');
        assertEquals(2, result.length);
        assertEquals(expected[0], result[0]);
        assertEquals(expected[1], result[1]);
    }
    // przypadek szczegolny, argument rowny null
    String[] tokens = EngineUtil.split2(null, ';');
    assertEquals("", tokens[0]);
    assertEquals("", tokens[1]);
}