### Question:
EIP1559 { public long computeBaseFee( final long parentBaseFee, final long parentBlockGasUsed, final long targetGasUsed) { guardActivation(); assert targetGasUsed != 0L; long delta = parentBlockGasUsed - targetGasUsed; long baseFee = parentBaseFee + floorDiv( floorDiv(parentBaseFee * delta, targetGasUsed), feeMarket.getBasefeeMaxChangeDenominator()); boolean neg = false; long diff = baseFee - parentBaseFee; if (diff < 0) { neg = true; diff = -diff; } long max = floorDiv(parentBaseFee, feeMarket.getBasefeeMaxChangeDenominator()); if (max < 1) { max = 1; } if (diff > max) { if (neg) { max = -max; } baseFee = parentBaseFee + max; } return baseFee; } EIP1559(final long forkBlockNumber); long computeBaseFee(
      final long parentBaseFee, final long parentBlockGasUsed, final long targetGasUsed); boolean isValidBaseFee(final long parentBaseFee, final long baseFee); long eip1559GasPool(final long blockNumber, final long gasLimit); long legacyGasPool(final long blockNumber, final long gasLimit); boolean isEIP1559(final long blockNumber); boolean isEIP1559Finalized(final long blockNumber); boolean isForkBlock(final long blockNumber); long getForkBlock(); boolean isValidFormat(
      final Transaction transaction, final AcceptedTransactionTypes acceptedTransactionTypes); boolean isValidTransaction(final long blockNumber, final Transaction transaction); long targetGasUsed(final BlockHeader header); static long targetGasUsed(
      final long blockNumber,
      final long migrationDuration,
      final long gasTarget,
      final long forkBlock);  }### Answer:
@Test public void assertThatBaseFeeDecreasesWhenBelowTargetGasUsed() { assertThat( eip1559.computeBaseFee( feeMarket.getInitialBasefee(), TARGET_GAS_USED - 1000000L, TARGET_GAS_USED)) .isLessThan(feeMarket.getInitialBasefee()) .isEqualTo(987500000L); }
@Test public void assertThatBaseFeeIncreasesWhenAboveTargetGasUsed() { assertThat( eip1559.computeBaseFee( feeMarket.getInitialBasefee(), TARGET_GAS_USED + 1000000L, TARGET_GAS_USED)) .isGreaterThan(feeMarket.getInitialBasefee()) .isEqualTo(1012500000L); }
@Test public void assertThatBaseFeeDoesNotChangeWhenAtTargetGasUsed() { assertThat( eip1559.computeBaseFee(feeMarket.getInitialBasefee(), TARGET_GAS_USED, TARGET_GAS_USED)) .isEqualTo(feeMarket.getInitialBasefee()); }