### Question:
ResetMessageEncoder implements MessageEncoder { @Override public void encode( Message message, ValuePacker packer ) throws IOException { checkArgument( message, ResetMessage.class ); packer.packStructHeader( 0, ResetMessage.SIGNATURE ); }  @Override void encode( Message message, ValuePacker packer );  }### Answer:
@Test void shouldEncodeResetMessage() throws Exception { encoder.encode( ResetMessage.RESET, packer ); verify( packer ).packStructHeader( 0, ResetMessage.SIGNATURE ); }
@Test void shouldFailToEncodeWrongMessage() { assertThrows( IllegalArgumentException.class, () -> encoder.encode( new RunMessage( "RETURN 2" ), packer ) ); }