// Path: copybook4java/src/main/java/com/nordea/oss/copybook/exceptions/TypeConverterException.java
// public class TypeConverterException extends RuntimeException {
//     private static final long serialVersionUID = -7577535992947276304L;
//     public TypeConverterException(String message) {
//         super(message);
//     }
// }
// 
// Path: copybook4java/src/main/java/com/nordea/oss/copybook/serializers/CopyBookFieldSigningType.java
// public enum CopyBookFieldSigningType {
//     POSTFIX,
//     PREFIX,
//     LAST_BYTE_BIT8,
//     LAST_BYTE_EBCDIC_BIT5
// }


import com.nordea.oss.copybook.exceptions.TypeConverterException;
import com.nordea.oss.copybook.serializers.CopyBookFieldSigningType;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

    }

    @Test
    public void testTo() throws Exception {
        assertEquals(new BigDecimal("-10.01"), typeConverter.to("1001-".getBytes(StandardCharsets.UTF_8), 0, 5, 2, true));
        assertEquals(new BigDecimal("-10.00001"), typeConverter.to("1000001-".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("-10.10000"), typeConverter.to("1010000-".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("-101000.0"), typeConverter.to("1010000-".getBytes(StandardCharsets.UTF_8), 0, 8, 1, true));
        assertEquals(new BigDecimal("10.01"), typeConverter.to("1001+".getBytes(StandardCharsets.UTF_8), 0, 5, 2, true));
        assertEquals(new BigDecimal("10.00001"), typeConverter.to("1000001+".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("10.10000"), typeConverter.to("1010000+".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("101000.0"), typeConverter.to("1010000+".getBytes(StandardCharsets.UTF_8), 0, 8, 1, true));
    }

    @Test
    public void testToZeroValue() throws Exception {
        assertEquals(new BigDecimal("0.00"), typeConverter.to("000000000+".getBytes(StandardCharsets.UTF_8), 0, 10, 2, true));
    }

    @Test
    public void testToNullDefaultValue() throws Exception {
        config.setNullFillerChar((char)0);
        config.setDefaultValue("42.00");
        typeConverter.initialize(config);
        assertEquals(new BigDecimal("42.00"), typeConverter.to(new byte[4], 0, 2, 2, true));
    }

    @Test
    public void testToNullValue() throws Exception {
// Path: copybook4java/src/main/java/com/nordea/oss/copybook/exceptions/TypeConverterException.java
// public class TypeConverterException extends RuntimeException {
//     private static final long serialVersionUID = -7577535992947276304L;
//     public TypeConverterException(String message) {
//         super(message);
//     }
// }
// 
// Path: copybook4java/src/main/java/com/nordea/oss/copybook/serializers/CopyBookFieldSigningType.java
// public enum CopyBookFieldSigningType {
//     POSTFIX,
//     PREFIX,
//     LAST_BYTE_BIT8,
//     LAST_BYTE_EBCDIC_BIT5
// }


// Path: copybook4java/src/test/java/com/nordea/oss/copybook/converters/SignedDecimalToBigDecimalPostfixTest.java
import com.nordea.oss.copybook.exceptions.TypeConverterException;
import com.nordea.oss.copybook.serializers.CopyBookFieldSigningType;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;


    }

    @Test
    public void testTo() throws Exception {
        assertEquals(new BigDecimal("-10.01"), typeConverter.to("1001-".getBytes(StandardCharsets.UTF_8), 0, 5, 2, true));
        assertEquals(new BigDecimal("-10.00001"), typeConverter.to("1000001-".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("-10.10000"), typeConverter.to("1010000-".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("-101000.0"), typeConverter.to("1010000-".getBytes(StandardCharsets.UTF_8), 0, 8, 1, true));
        assertEquals(new BigDecimal("10.01"), typeConverter.to("1001+".getBytes(StandardCharsets.UTF_8), 0, 5, 2, true));
        assertEquals(new BigDecimal("10.00001"), typeConverter.to("1000001+".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("10.10000"), typeConverter.to("1010000+".getBytes(StandardCharsets.UTF_8), 0, 8, 5, true));
        assertEquals(new BigDecimal("101000.0"), typeConverter.to("1010000+".getBytes(StandardCharsets.UTF_8), 0, 8, 1, true));
    }

    @Test
    public void testToZeroValue() throws Exception {
        assertEquals(new BigDecimal("0.00"), typeConverter.to("000000000+".getBytes(StandardCharsets.UTF_8), 0, 10, 2, true));
    }

    @Test
    public void testToNullDefaultValue() throws Exception {
        config.setNullFillerChar((char)0);
        config.setDefaultValue("42.00");
        typeConverter.initialize(config);
        assertEquals(new BigDecimal("42.00"), typeConverter.to(new byte[4], 0, 2, 2, true));
    }

    @Test
    public void testToNullValue() throws Exception {
        expectedEx.expect(TypeConverterException.class);