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