@Test
public void testEncode() {

    DateType.setDefaultOutputPattern("dd-MM-yyyy");
    // przypadki testowe
    Object[][] testCases = {
        {d("01-01-1900"), "01-01-1900"},
        {d("28-02-2000"), "28-02-2000"},
        {null, null}
    };
    // wykonanie testow
    for (Object[] testCase : testCases) {
        Date date = (Date) testCase[0];
        DateHolder holder = new DateHolder(date);
        String expectedResult = (String) testCase[1];
        assertEquals(expectedResult, type.encode(holder));
    }
}