// 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/exception/OADException.java
// public class OADException extends Exception {
//     public OADException(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 com.punchthrough.bean.sdk.internal.exception.OADException;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static com.punchthrough.bean.sdk.internal.utility.Convert.intArrayToByteArray;
import static junit.framework.Assert.fail;
import static org.assertj.core.api.Assertions.assertThat;
package com.punchthrough.bean.sdk.upload;





public class FirmwareBundleTest {

    byte[] rawImageData = intArrayToByteArray(new int[] {
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF
    });

    List<FirmwareImage> images = new ArrayList<>();
    FirmwareImage imageA;
    FirmwareImage imageB;
    FirmwareBundle bundle;

    @Before
    public void setUp() throws ImageParsingException {
        imageA = new FirmwareImage(rawImageData, "123450000_a_testNameA.bin");
        imageB = new FirmwareImage(rawImageData, "123450000_a_testNameB.bin");
    }

    @Test
    public void testFirmwareBundleVersion() throws ImageParsingException {
        images.add(imageA);
        bundle = new FirmwareBundle(images);
        assertThat(bundle.version()).isEqualTo(123450000);
    }

    @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/exception/OADException.java
// public class OADException extends Exception {
//     public OADException(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/FirmwareBundleTest.java
import com.punchthrough.bean.sdk.internal.exception.ImageParsingException;
import com.punchthrough.bean.sdk.internal.exception.OADException;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static com.punchthrough.bean.sdk.internal.utility.Convert.intArrayToByteArray;
import static junit.framework.Assert.fail;
import static org.assertj.core.api.Assertions.assertThat;

package com.punchthrough.bean.sdk.upload;





public class FirmwareBundleTest {

    byte[] rawImageData = intArrayToByteArray(new int[] {
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF,
            0xFF, 0xFF, 0xFF, 0xFF
    });

    List<FirmwareImage> images = new ArrayList<>();
    FirmwareImage imageA;
    FirmwareImage imageB;
    FirmwareBundle bundle;

    @Before
    public void setUp() throws ImageParsingException {
        imageA = new FirmwareImage(rawImageData, "123450000_a_testNameA.bin");
        imageB = new FirmwareImage(rawImageData, "123450000_a_testNameB.bin");
    }

    @Test
    public void testFirmwareBundleVersion() throws ImageParsingException {
        images.add(imageA);
        bundle = new FirmwareBundle(images);
        assertThat(bundle.version()).isEqualTo(123450000);
    }

    @Test
    public void testFirmwareBundleGetNextImageOneImage() throws ImageParsingException, OADException {