### Question:
TransactionReplacementByPriceRule implements TransactionPoolReplacementRule { @Override public boolean shouldReplace( final TransactionInfo existingTransactionInfo, final TransactionInfo newTransactionInfo, final Optional<Long> baseFee) { assert existingTransactionInfo.getTransaction() != null && newTransactionInfo.getTransaction() != null; final Wei replacementThreshold = priceOf(existingTransactionInfo.getTransaction(), baseFee) .multiply(100 + priceBump.getValue()) .divide(100); return priceOf(newTransactionInfo.getTransaction(), baseFee).compareTo(replacementThreshold) > 0; } TransactionReplacementByPriceRule(final Percentage priceBump); @Override boolean shouldReplace(
      final TransactionInfo existingTransactionInfo,
      final TransactionInfo newTransactionInfo,
      final Optional<Long> baseFee);  }### Answer:
@Test public void shouldReplace() { assertThat( new TransactionReplacementByPriceRule(Percentage.fromInt(priceBump)) .shouldReplace(oldTx, newTx, baseFee)) .isEqualTo(expected); }