    @Test
    public void isTxConsistentReturnsFalseAsExpected() {

        Wallet wallet = new Wallet(PARAMS);
        TransactionOutput to = createMock(TransactionOutput.class);
        EasyMock.expect(to.isAvailableForSpending()).andReturn(true);
        EasyMock.expect(to.isMineOrWatched(wallet)).andReturn(true);
        EasyMock.expect(to.getSpentBy()).andReturn(new TransactionInput(PARAMS, null, new byte[0]));

        Transaction tx = FakeTxBuilder.createFakeTxWithoutChange(PARAMS, to);

        replay(to);

        boolean isConsistent = wallet.isTxConsistent(tx, false);
        assertFalse(isConsistent);
    }