@Test
  public void skipBytesLargerThanMessageSizeConverter() throws SerDeException {
    // The simple record we are serializing is two strings, that combine to be 7 characters or 14 bytes.
    // Adding in the 5 byte offset, we get 19 bytes. To make sure we go bigger than that, we are setting
    // the offset to ten times that value.
    Integer offset = 190;

    Properties tbl = new Properties();
    tbl.setProperty(AvroSerdeUtils.AvroTableProperties.AVRO_SERDE_TYPE.getPropName(), "SKIP");
    tbl.setProperty(AvroSerdeUtils.AvroTableProperties.AVRO_SERDE_SKIP_BYTES.getPropName(), offset.toString());

    exception.expect(RuntimeException.class);
    exception.expectMessage("org.apache.hadoop.hive.serde2.SerDeException: " +
        "Skip bytes value is larger than the message length.");
    runConversionTest(tbl, simpleRecordConfluentBytes);
  }
Test that when we skip more bytes than are in the message, we throw an exception properly.
kafka-handler/src/test/org/apache/hadoop/hive/kafka/AvroBytesConverterTest.java