### Question:
EIP1559 { public boolean isValidFormat( final Transaction transaction, final AcceptedTransactionTypes acceptedTransactionTypes) { if (transaction == null) { return false; } switch (acceptedTransactionTypes) { case FRONTIER_TRANSACTIONS: return transaction.isFrontierTransaction(); case FEE_MARKET_TRANSITIONAL_TRANSACTIONS: return transaction.isFrontierTransaction() || transaction.isEIP1559Transaction(); case FEE_MARKET_TRANSACTIONS: return transaction.isEIP1559Transaction(); default: return false; } } 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 givenValidLegacyTransaction_whenBeforeForkBlock_thenReturnsTrue() { assertThat(eip1559.isValidFormat(TransactionFixture.LEGACY, FRONTIER_TRANSACTIONS)).isTrue(); }
@Test public void givenValidLegacyTransaction_whenEIP1559Phase1_thenReturnsTrue() { assertThat( eip1559.isValidFormat(TransactionFixture.LEGACY, FEE_MARKET_TRANSITIONAL_TRANSACTIONS)) .isTrue(); }
@Test public void givenValidLegacyTransaction_whenEIP1559Finalized_thenReturnsFalse() { assertThat(eip1559.isValidFormat(TransactionFixture.LEGACY, FEE_MARKET_TRANSACTIONS)).isFalse(); }
@Test public void givenValidEIP1559Transaction_whenAfterForkBlock_thenReturnsTrue() { assertThat( eip1559.isValidFormat(TransactionFixture.EIP1559, FEE_MARKET_TRANSITIONAL_TRANSACTIONS)) .isTrue(); }
@Test public void givenValidEIP1559Transaction_whenEIP1559Finalized_thenReturnsTrue() { assertThat(eip1559.isValidFormat(TransactionFixture.EIP1559, FEE_MARKET_TRANSACTIONS)).isTrue(); }
@Test public void givenValidEIP1559Transaction_whenBeforeFork_thenReturnsFalse() { assertThat(eip1559.isValidFormat(TransactionFixture.EIP1559, FRONTIER_TRANSACTIONS)).isFalse(); }