code: @VisibleForTesting
      Block createNextBlockWithCoinbase(long version, byte[] pubKey, final int height) {
          return createNextBlock(null, version, (TransactionOutPoint) null,
                                 Utils.currentTimeSeconds(), pubKey, FIFTY_COINS, height);
      }
docs: Create a block sending 50BTC as a coinbase transaction to the public key specified.
  This method is intended for test use only.