# Path: afkak/_util.py
# _NULL_SHORT_STRING = struct.pack('>h', -1)
# def _buffer_underflow(what, buf, offset, size):
# def _coerce_topic(topic):
# def _coerce_consumer_group(consumer_group):
# def _coerce_client_id(client_id):
# def write_int_string(s):
# def write_short_ascii(s):
# def write_short_text(s):
# def write_short_bytes(b):
# def read_short_bytes(data, cur):
# def read_short_ascii(data, cur):
# def read_short_text(data, cur):
# def read_int_string(data, cur):
# def relative_unpack(fmt, data, cur):
# def group_by_topic_and_partition(tuples):
# 
# Path: afkak/common.py
# class BufferUnderflowError(KafkaError):
#     pass


import struct
import unittest
import afkak.common
from afkak import _util as util
from afkak.common import BufferUnderflowError
# -*- coding: utf-8 -*-
# Copyright 2015 Cyan, Inc.
# Copyright 2017, 2018 Ciena Corporation.




class TestUtil(unittest.TestCase):
    def test_write_int_string(self):
        self.assertEqual(

# Path: afkak/_util.py
# _NULL_SHORT_STRING = struct.pack('>h', -1)
# def _buffer_underflow(what, buf, offset, size):
# def _coerce_topic(topic):
# def _coerce_consumer_group(consumer_group):
# def _coerce_client_id(client_id):
# def write_int_string(s):
# def write_short_ascii(s):
# def write_short_text(s):
# def write_short_bytes(b):
# def read_short_bytes(data, cur):
# def read_short_ascii(data, cur):
# def read_short_text(data, cur):
# def read_int_string(data, cur):
# def relative_unpack(fmt, data, cur):
# def group_by_topic_and_partition(tuples):
# 
# Path: afkak/common.py
# class BufferUnderflowError(KafkaError):
#     pass


# Path: afkak/test/test_util.py
import struct
import unittest
import afkak.common
from afkak import _util as util
from afkak.common import BufferUnderflowError

# -*- coding: utf-8 -*-
# Copyright 2015 Cyan, Inc.
# Copyright 2017, 2018 Ciena Corporation.




class TestUtil(unittest.TestCase):
    def test_write_int_string(self):
        self.assertEqual(

            util.write_int_string(b'some string'),