// Path: src/main/java/org/unitedid/yhsm/internal/YubiHSMInputException.java
// public class YubiHSMInputException extends Exception {
//     public YubiHSMInputException() {}
// 
//     public YubiHSMInputException(String message) {
//         super(message);
//     }
// 
//     public YubiHSMInputException(Throwable cause) {
//         super(cause);
//     }
// 
//     public YubiHSMInputException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/unitedid/yhsm/internal/Defines.java
// final static public int YSM_AEAD_NONCE_SIZE = 6;


import org.testng.annotations.Test;
import org.unitedid.yhsm.internal.YubiHSMInputException;
import static org.testng.Assert.assertEquals;
import static org.unitedid.yhsm.internal.Defines.YSM_AEAD_NONCE_SIZE;
        assertEquals(Utils.leIntToBA(8192), expected);
    }

    @Test
    public void testRangeOfByteArray() throws Exception {
        byte[] data = "ekoeko".getBytes();
        byte[] expected = {0x6b, 0x6f};

        assertEquals(Utils.rangeOfByteArray(data, 1, 2), expected);
    }

    @Test
    public void testByteArrayToHexString() throws Exception {
        byte[] data = "ekoeko".getBytes();
        String expected = "656b6f656b6f";

        assertEquals(Utils.byteArrayToHex(data), expected);
    }

    @Test
    public void testHexToByteArray() throws Exception {
        String data = "656b6f656b6f";
        byte[] expected = {0x65,0x6b,0x6f,0x65,0x6b,0x6f};

        assertEquals(Utils.hexToByteArray(data), expected);
    }

    @Test
    public void testValidateNonce() throws Exception {
        String data = "12";
// Path: src/main/java/org/unitedid/yhsm/internal/YubiHSMInputException.java
// public class YubiHSMInputException extends Exception {
//     public YubiHSMInputException() {}
// 
//     public YubiHSMInputException(String message) {
//         super(message);
//     }
// 
//     public YubiHSMInputException(Throwable cause) {
//         super(cause);
//     }
// 
//     public YubiHSMInputException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/unitedid/yhsm/internal/Defines.java
// final static public int YSM_AEAD_NONCE_SIZE = 6;


// Path: src/test/java/org/unitedid/yhsm/utility/UtilsTest.java
import org.testng.annotations.Test;
import org.unitedid.yhsm.internal.YubiHSMInputException;
import static org.testng.Assert.assertEquals;
import static org.unitedid.yhsm.internal.Defines.YSM_AEAD_NONCE_SIZE;

        assertEquals(Utils.leIntToBA(8192), expected);
    }

    @Test
    public void testRangeOfByteArray() throws Exception {
        byte[] data = "ekoeko".getBytes();
        byte[] expected = {0x6b, 0x6f};

        assertEquals(Utils.rangeOfByteArray(data, 1, 2), expected);
    }

    @Test
    public void testByteArrayToHexString() throws Exception {
        byte[] data = "ekoeko".getBytes();
        String expected = "656b6f656b6f";

        assertEquals(Utils.byteArrayToHex(data), expected);
    }

    @Test
    public void testHexToByteArray() throws Exception {
        String data = "656b6f656b6f";
        byte[] expected = {0x65,0x6b,0x6f,0x65,0x6b,0x6f};

        assertEquals(Utils.hexToByteArray(data), expected);
    }

    @Test
    public void testValidateNonce() throws Exception {
        String data = "12";
        assertEquals(Utils.validateNonce(data.getBytes(), true).length, YSM_AEAD_NONCE_SIZE);