@Test
public void testConvert() {

    // przypadki testowe: [argument (Object)][oczekiwana wartosc holdera (BigDecimal)]
    Object[][] testCases = {
        {new Long(17), new BigDecimal("17")},
        {new Integer(50), new BigDecimal("50")},
        {new Double(0.12345), new BigDecimal(0.12345)},
        {new Float(0.12345), new BigDecimal(0.12345f)},
        {(byte) 100, new BigDecimal(100)},
        {(short) 2000, new BigDecimal(2000)},
        {(float) 123, new BigDecimal(123f)},
        {null, null},
        {"", null},
        {" ", null},
        {"123,45", new BigDecimal("123.45")},
        {new BigInteger("1234"), new BigDecimal(1234)},
        {new BigDecimal("00.12"), new BigDecimal("00.12")},
        {String.valueOf(Long.MIN_VALUE), new BigDecimal(Long.MIN_VALUE)},
        {String.valueOf(Long.MAX_VALUE), new BigDecimal(Long.MAX_VALUE)}
    };
    // wykonanie testow
    for (Object[] testCase : testCases) {
        Object obj = testCase[0];
        BigDecimal expectedValue = (BigDecimal) testCase[1];
        assertEquals(expectedValue, type.convert(obj).getBigDecimal());
        assertEquals(expectedValue, type.convert(obj).getValue());
    }
}