### Question:
TransactionAwareTradableFactory { TransactionAwareTradable create(Tradable delegate) { if (delegate instanceof OpenOffer) { return new TransactionAwareOpenOffer((OpenOffer) delegate); } else if (delegate instanceof Trade) { return new TransactionAwareTrade((Trade) delegate, arbitrationManager, refundManager, btcWalletService, pubKeyRing); } else { return new DummyTransactionAwareTradable(delegate); } } @Inject  TransactionAwareTradableFactory(ArbitrationManager arbitrationManager,
                                    RefundManager refundManager,
                                    BtcWalletService btcWalletService,
                                    PubKeyRing pubKeyRing);   }### Answer:
@Test public void testCreateWhenNotOpenOfferOrTrade() { ArbitrationManager arbitrationManager = mock(ArbitrationManager.class); TransactionAwareTradableFactory factory = new TransactionAwareTradableFactory(arbitrationManager, null, null, null); Tradable delegate = mock(Tradable.class); assertFalse(delegate instanceof OpenOffer); assertFalse(delegate instanceof Trade); TransactionAwareTradable tradable = factory.create(delegate); assertFalse(tradable.isRelatedToTransaction(mock(Transaction.class))); }