### Question:
EthHashMinerExecutor extends AbstractMinerExecutor<EthHashBlockMiner> { public void setCoinbase(final Address coinbase) { if (coinbase == null) { throw new IllegalArgumentException("Coinbase cannot be unset."); } else { this.coinbase = Optional.of(Address.wrap(coinbase.copy())); } } EthHashMinerExecutor(
      final ProtocolContext protocolContext,
      final ProtocolSchedule protocolSchedule,
      final PendingTransactions pendingTransactions,
      final MiningParameters miningParams,
      final AbstractBlockScheduler blockScheduler,
      final GasLimitCalculator gasLimitCalculator); @Override Optional<EthHashBlockMiner> startAsyncMining(
      final Subscribers<MinedBlockObserver> observers,
      final Subscribers<EthHashObserver> ethHashObservers,
      final BlockHeader parentHeader); @Override EthHashBlockMiner createMiner(
      final Subscribers<MinedBlockObserver> observers,
      final Subscribers<EthHashObserver> ethHashObservers,
      final BlockHeader parentHeader); void setCoinbase(final Address coinbase); @Override Optional<Address> getCoinbase();  }### Answer:
@Test public void settingCoinbaseToNullThrowsException() { final MiningParameters miningParameters = new MiningParametersTestBuilder().build(); final PendingTransactions pendingTransactions = new PendingTransactions( TransactionPoolConfiguration.DEFAULT_TX_RETENTION_HOURS, 1, 5, TestClock.fixed(), metricsSystem, () -> null, Optional.empty(), TransactionPoolConfiguration.DEFAULT_PRICE_BUMP); final EthHashMinerExecutor executor = new EthHashMinerExecutor( null, null, pendingTransactions, miningParameters, new DefaultBlockScheduler(1, 10, TestClock.fixed()), GasLimitCalculator.constant()); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> executor.setCoinbase(null)) .withMessageContaining("Coinbase cannot be unset."); }