### Question:
LimitedNewPooledTransactionHashesMessages { public static LimitedNewPooledTransactionHashesMessages createLimited( final Iterable<Hash> hashes) { final List<Hash> includedTransactions = new ArrayList<>(); final BytesValueRLPOutput message = new BytesValueRLPOutput(); int count = 0; message.startList(); for (final Hash txHash : hashes) { final BytesValueRLPOutput encodedHashes = new BytesValueRLPOutput(); encodedHashes.writeBytes(txHash); Bytes encodedBytes = encodedHashes.encoded(); message.writeRLPUnsafe(encodedBytes); includedTransactions.add(txHash); count++; if (count >= MAX_COUNT) { break; } } message.endList(); return new LimitedNewPooledTransactionHashesMessages( new NewPooledTransactionHashesMessage(message.encoded()), includedTransactions); } LimitedNewPooledTransactionHashesMessages(
      final NewPooledTransactionHashesMessage transactionsMessage,
      final List<Hash> includedTransactions); static LimitedNewPooledTransactionHashesMessages createLimited(
      final Iterable<Hash> hashes); final NewPooledTransactionHashesMessage getTransactionsMessage(); final List<Hash> getIncludedTransactions();  }### Answer:
@Test public void createLimited() { final List<Hash> txs = generator.transactions(6000).stream() .map(Transaction::getHash) .collect(Collectors.toList()); final LimitedNewPooledTransactionHashesMessages firstMessage = LimitedNewPooledTransactionHashesMessages.createLimited(txs); assertThat(firstMessage.getIncludedTransactions().size()).isEqualTo(4096); txs.removeAll(firstMessage.getIncludedTransactions()); assertThat(txs.size()).isEqualTo(6000 - 4096); final LimitedNewPooledTransactionHashesMessages secondMessage = LimitedNewPooledTransactionHashesMessages.createLimited(txs); assertThat(secondMessage.getIncludedTransactions().size()).isEqualTo(6000 - 4096); txs.removeAll(secondMessage.getIncludedTransactions()); assertThat(txs.size()).isEqualTo(0); assertThat( firstMessage.getTransactionsMessage().getSize() + secondMessage.getTransactionsMessage().getSize()) .isLessThan(2 * LimitedTransactionsMessages.LIMIT); }