// Path: sdk/src/main/java/com/punchthrough/bean/sdk/internal/exception/ImageParsingException.java
// public class ImageParsingException extends Exception {
//     public ImageParsingException(String detailMessage) {
//         super(detailMessage);
//     }
// }
// 
// Path: sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/Convert.java
// public static byte[] intArrayToByteArray(int[] intArray) {
// 
//     byte[] byteArray = new byte[intArray.length];
// 
//     for (int i = 0; i < intArray.length; i++) {
//         byteArray[i] = intToByte(intArray[i]);
//     }
// 
//     return byteArray;
// 
// }


import com.punchthrough.bean.sdk.internal.exception.ImageParsingException;
import org.junit.Test;
import static com.punchthrough.bean.sdk.internal.utility.Convert.intArrayToByteArray;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
    });

    byte[] rawImageData_invalid = intArrayToByteArray(new int[] {

            // Valid header - 16 bytes data
            0x2B, 0x65,                // CRC
            0xFF, 0xFF,                // CRC Shadow
            0x64, 0x00,                // Version
            0x00, 0x7C,                // Length
            0x41, 0x41, 0x41, 0x41,    // AAAA
            0xFF, 0xFF, 0xFF, 0xFF,     // Reserved

            // Valid block - 16 bytes of image data
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,

            // Invalid block - only 10 bytes of image data
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF

    });

    @Test
// Path: sdk/src/main/java/com/punchthrough/bean/sdk/internal/exception/ImageParsingException.java
// public class ImageParsingException extends Exception {
//     public ImageParsingException(String detailMessage) {
//         super(detailMessage);
//     }
// }
// 
// Path: sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/Convert.java
// public static byte[] intArrayToByteArray(int[] intArray) {
// 
//     byte[] byteArray = new byte[intArray.length];
// 
//     for (int i = 0; i < intArray.length; i++) {
//         byteArray[i] = intToByte(intArray[i]);
//     }
// 
//     return byteArray;
// 
// }


// Path: sdk/src/test/java/com/punchthrough/bean/sdk/upload/FirmwareImageTest.java
import com.punchthrough.bean.sdk.internal.exception.ImageParsingException;
import org.junit.Test;
import static com.punchthrough.bean.sdk.internal.utility.Convert.intArrayToByteArray;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;

    });

    byte[] rawImageData_invalid = intArrayToByteArray(new int[] {

            // Valid header - 16 bytes data
            0x2B, 0x65,                // CRC
            0xFF, 0xFF,                // CRC Shadow
            0x64, 0x00,                // Version
            0x00, 0x7C,                // Length
            0x41, 0x41, 0x41, 0x41,    // AAAA
            0xFF, 0xFF, 0xFF, 0xFF,     // Reserved

            // Valid block - 16 bytes of image data
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,

            // Invalid block - only 10 bytes of image data
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF,
            0xFF, 0xFF

    });

    @Test
    public void testParsingValidImage() throws ImageParsingException {