@Test
public void testGetStringIndexFromStringCode() {

    int stringCode = 0;
    int index = 0;
    int stringIndex = 0;
    stringCode = 2;
    stringIndex = instance.getStringIndexFromStringCode(stringCode, index);
    Assert.assertEquals(stringIndex, 1);
    stringCode = 4;
    stringIndex = instance.getStringIndexFromStringCode(stringCode, index);
    Assert.assertEquals(stringIndex, 2);
    stringCode = 8;
    stringIndex = instance.getStringIndexFromStringCode(stringCode, index);
    Assert.assertEquals(stringIndex, 3);
    stringCode = 64;
    stringIndex = instance.getStringIndexFromStringCode(stringCode, index);
    Assert.assertEquals(stringIndex, 6);
    index = 0;
    stringCode = 0xC;
    stringIndex = instance.getStringIndexFromStringCode(stringCode, index);
    Assert.assertEquals(stringIndex, 2);
    stringCode = 0xC;
    index = 1;
    stringIndex = instance.getStringIndexFromStringCode(stringCode, index);
    Assert.assertEquals(stringIndex, 3);
    // invalid index
    stringIndex = instance.getStringIndexFromStringCode(2, 1);
    Assert.assertEquals(stringIndex, -1);
}