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