@Test
public void testEncode() {

    // przypadki testowe
    Object[][] testCases = {
        {num("-100"), "-100"},
        {num("-100.00"), "-100.00"},
        {num("0.0"), "0.0"},
        {num(".0"), "0.0"},
        {num(".000"), "0.000"},
        {num("12.3456789"), "12.3456789"},
        {num(null), null}
    };
    // wykonanie testow
    for (Object[] testCase : testCases) {
        NumberHolder value = (NumberHolder) testCase[0];
        String expectedResult = (String) testCase[1];
        assertEquals(expectedResult, type.encode(value));
    }
}