private static byte[] toBytes(String prefix, int i) {
    // wrapping with try-catch to avoid dealing with checked exceptions
    try {
      ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
      byteArrayOutputStream.write(prefix.getBytes());
      byteArrayOutputStream.write(Ints.toByteArray(i));
      return byteArrayOutputStream.toByteArray();
    } catch (IOException e) {
      throw new SamzaException(e);
    }
  }
Concatenates bytes for {@code prefix} with bytes for {@code i}.
If this is called multiple times with the same {@code prefix} and any {@code i}, then this needs to return a byte[]
of the same length for each call.
samza-kv-inmemory/src/test/java/org/apache/samza/storage/kv/inmemory/TestInMemoryKeyValueStore.java