@Test
public void testDecode() {

    // przypadki testowe
    Object[][] testCases = {
        {"-100", num2(new BigDecimal("-100"))},
        {"-100.00", num2(new BigDecimal("-100.00"))},
        {"0.0", num2(new BigDecimal("0.0"))},
        {".0", num2(new BigDecimal("0.0"))},
        {"  .00 ", num2(new BigDecimal("0.00"))},
        {null, new NumberHolder(null)},
        {"  ", new NumberHolder(null)},
        {"", new NumberHolder(null)},
        {"1e3", num2(new BigDecimal("1e3"))},
        {"1.2e2", num2(new BigDecimal("1.2E2"))},
        {"1,23", num2(new BigDecimal("1.23"))},
        {"1 234", num2(new BigDecimal("1234"))}
    };
    // wykonanie testow
    for (Object[] testCase : testCases) {
        String text = (String) testCase[0];
        NumberHolder expectedHolder = (NumberHolder) testCase[1];
        assertEquals(expectedHolder, type.decode(text));
        assertEquals(expectedHolder.getBigDecimal(), type.decode(text).getBigDecimal());
    }
}