### Question:
CoinbaseTx extends SpecialTxPayload { public long getHeight() { return height; } CoinbaseTx(NetworkParameters params, Transaction tx); int getCurrentVersion(); String toString(); @Override Transaction.Type getType(); @Override String getName(); @Override JSONObject toJson(); long getHeight(); Sha256Hash getMerkleRootMasternodeList(); Sha256Hash getMerkleRootQuorums(); static final int CURRENT_VERSION; }### Answer:
@Test public void verifyTest() { Sha256Hash txId = Sha256Hash.wrap("7fdcbf835dc7b0d4fe2c8d1b5b3ef32ea5a26d0a225b52a0bb7652804535a491"); Transaction tx = new Transaction(PARAMS, txdata); CoinbaseTx cbtx = (CoinbaseTx)tx.getExtraPayloadObject(); byte [] payloadDataToConfirm = Utils.HEX.decode("0100fa050000aaaec8d6a8535a01bd844817dea1faed66f6c397b1dcaec5fe8c5af025023c35"); assertArrayEquals("Payload Data does not match", payloadDataToConfirm, cbtx.getPayload()); assertEquals(txId, tx.getHash()); assertEquals(1530, cbtx.getHeight()); try { UnsafeByteArrayOutputStream stream = new UnsafeByteArrayOutputStream(txdata.length); tx.bitcoinSerialize(stream); assertArrayEquals("Coinbase transaction does not match it's data", txdata, stream.toByteArray()); } catch (IOException x) { fail(); } }