### Question:
TransactionUtils { public static boolean checkEssentiallyEqual(Transaction unsignedTransaction, Transaction signedTransaction) { List<TransactionInput> unsignedTransactionInputs = unsignedTransaction.getInputs(); List<TransactionOutput> unsignedTransactionOutputs = unsignedTransaction.getOutputs(); List<TransactionInput> signedTransactionInputs = signedTransaction.getInputs(); List<TransactionOutput> signedTransactionOutputs = signedTransaction.getOutputs(); if (unsignedTransactionInputs.size() != signedTransactionInputs.size() || unsignedTransactionOutputs.size() != signedTransactionOutputs.size()) { return false; } for (TransactionInput unsignedTxInput : unsignedTransactionInputs) { if (!checkTransactionInputs(unsignedTxInput, signedTransactionInputs)) { return false; } } for (TransactionOutput unsignedTxOutput : unsignedTransactionOutputs) { if (!checkTransactionOutputs(unsignedTxOutput, signedTransactionOutputs)) { return false; } } for (TransactionInput signedTxInput : signedTransactionInputs) { if (!checkTransactionInputs(signedTxInput, unsignedTransactionInputs)) { return false; } } for (TransactionOutput signedTxOutput : signedTransactionOutputs) { if (!checkTransactionOutputs(signedTxOutput, unsignedTransactionOutputs)) { return false; } } return true; } private  TransactionUtils(); static Optional<Transaction> getTransactionByHash(Transaction tx, byte[] txHash); static boolean checkEssentiallyEqual(Transaction unsignedTransaction, Transaction signedTransaction);  }### Answer:
@Test public void testCheckEssentiallyEqual() throws Exception { Transaction dummy1 = FakeTxBuilder.createFakeTx(PARAMS, Coin.COIN, ADDRESS1); Transaction tx1 = new Transaction(PARAMS); tx1.addInput(dummy1.getOutput(0)); tx1.addOutput(Coin.COIN, ADDRESS1); Transaction dummy2 = FakeTxBuilder.createFakeTx(PARAMS, Coin.COIN, ADDRESS2); Transaction tx2 = new Transaction(PARAMS); tx2.addInput(dummy2.getOutput(0)); tx2.addOutput(Coin.COIN, ADDRESS1); Transaction tx3 = new Transaction(PARAMS); tx3.addInput(dummy1.getOutput(0)); tx3.addOutput(Coin.COIN, ADDRESS2); assertThat(TransactionUtils.checkEssentiallyEqual(tx1, tx1)).isTrue(); assertThat(TransactionUtils.checkEssentiallyEqual(tx1, tx2)).isFalse(); assertThat(TransactionUtils.checkEssentiallyEqual(tx2, tx1)).isFalse(); assertThat(TransactionUtils.checkEssentiallyEqual(tx1, tx3)).isFalse(); assertThat(TransactionUtils.checkEssentiallyEqual(tx3, tx1)).isFalse(); }