### Question:
RotateEvent { public void parse(final ByteBuf in) { position = DataTypesCodec.readInt8LE(in); nextFileName = DataTypesCodec.readFixedLengthString(in.readableBytes(), in); }  void parse(final ByteBuf in);  }### Answer:
@Test public void assertParse() { ByteBuf rotateEventByteBuf = Unpooled.buffer(); rotateEventByteBuf.writeLongLE(Long.MAX_VALUE); rotateEventByteBuf.writeBytes("binlog-000001".getBytes()); RotateEvent actual = new RotateEvent(); actual.parse(rotateEventByteBuf); assertThat(actual.getPosition(), is(Long.MAX_VALUE)); assertThat(actual.getNextFileName(), is("binlog-000001")); }