### Question:
NewPooledTransactionHashesMessage extends AbstractMessageData { public static NewPooledTransactionHashesMessage readFrom(final MessageData message) { if (message instanceof NewPooledTransactionHashesMessage) { return (NewPooledTransactionHashesMessage) message; } final int code = message.getCode(); if (code != MESSAGE_CODE) { throw new IllegalArgumentException( String.format( "Message has code %d and thus is not a NewPooledTransactionHashesMessage.", code)); } return new NewPooledTransactionHashesMessage(message.getData()); } NewPooledTransactionHashesMessage(final Bytes rlp); @Override int getCode(); static NewPooledTransactionHashesMessage create(final List<Hash> pendingTransactions); static NewPooledTransactionHashesMessage readFrom(final MessageData message); List<Hash> pendingTransactions();  }### Answer:
@Test public void readFromMessageWithWrongCodeThrows() { final RawMessage rawMsg = new RawMessage(EthPV62.BLOCK_HEADERS, Bytes.of(0)); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> NewPooledTransactionHashesMessage.readFrom(rawMsg)); }