### Question:
BlockExecutor { public void executeAndFill(Block block, Block parent) { BlockResult result = execute(block, parent.getStateRoot(), true); fill(block, result); } BlockExecutor(Repository repository, TransactionExecutorFactory transactionExecutorFactory); void executeAndFill(Block block, Block parent); void executeAndFillAll(Block block, Block parent); void executeAndFillReal(Block block, Block parent); boolean executeAndValidate(Block block, Block parent); boolean validate(Block block, BlockResult result); BlockResult execute(Block block, byte[] stateRoot, boolean discardInvalidTxs); BlockResult executeAll(Block block, byte[] stateRoot);  }### Answer:
@Test public void executeAndFillBlockWithTxToExcludeBecauseSenderHasNoBalance() { Repository repository = new RepositoryImpl(new TrieStoreImpl(new HashMapDB()), new TrieStorePoolOnMemory(), config.detailsInMemoryStorageLimit()); Repository track = repository.startTracking(); Account account = createAccount("acctest1", track, Coin.valueOf(30000)); Account account2 = createAccount("acctest2", track, Coin.valueOf(10L)); Account account3 = createAccount("acctest3", track, Coin.ZERO); track.commit(); Assert.assertFalse(Arrays.equals(EMPTY_TRIE_HASH, repository.getRoot())); final ProgramInvokeFactoryImpl programInvokeFactory = new ProgramInvokeFactoryImpl(); BlockExecutor executor = new BlockExecutor(repository, (tx1, txindex1, coinbase, track1, block1, totalGasUsed1) -> new TransactionExecutor( tx1, txindex1, block1.getCoinbase(), track1, null, null, programInvokeFactory, block1, null, totalGasUsed1, config.getVmConfig(), config.getBlockchainConfig(), config.playVM(), config.isRemascEnabled(), config.vmTrace(), new PrecompiledContracts(config), config.databaseDir(), config.vmTraceDir(), config.vmTraceCompressed() )); Transaction tx = createTransaction(account, account2, BigInteger.TEN, repository.getNonce(account.getAddress())); Transaction tx2 = createTransaction(account3, account2, BigInteger.TEN, repository.getNonce(account3.getAddress())); List<Transaction> txs = new ArrayList<>(); txs.add(tx); txs.add(tx2); List<BlockHeader> uncles = new ArrayList<>(); BlockGenerator blockGenerator = new BlockGenerator(); Block genesis = blockGenerator.getGenesisBlock(); genesis.setStateRoot(repository.getRoot()); Block block = blockGenerator.createChildBlock(genesis, txs, uncles, 1, null); executor.executeAndFill(block, genesis); Assert.assertEquals(1, block.getTransactionsList().size()); Assert.assertEquals(tx, block.getTransactionsList().get(0)); Assert.assertArrayEquals(Block.getTxTrie(Lists.newArrayList(tx)).getHash().getBytes(), block.getTxTrieRoot()); Assert.assertEquals(3141592, new BigInteger(1, block.getGasLimit()).longValue()); }