out.writeUTF("else");
out.writeUTF(higherThresholdValue);
out.writeUTF(lowerThresholdValue);
HandlesStreamInput in = new HandlesStreamInput(new BytesStreamInput(bytesOut.copiedByteArray()));
assertThat(in.readUTF(), equalTo(lowerThresholdValue));
assertThat(in.readUTF(), equalTo(higherThresholdValue));
assertThat(in.readInt(), equalTo(1));
assertThat(in.readUTF(), equalTo("else"));
assertThat(in.readUTF(), equalTo(higherThresholdValue));
assertThat(in.readUTF(), equalTo(lowerThresholdValue));