### Question:
TransactionPool { public synchronized int inject(Transaction tx) { int ret = checkTx(tx); if (0 == ret) { queue.put(tx); known.add(tx.getHash()); } return ret; } private  TransactionPool(int initialCapacity); static TransactionPool getInstance(); synchronized int inject(Transaction tx); boolean isKnown(byte[] hash); int pending(); void clear(); synchronized void drop(Transaction tx); synchronized ArrayList<Transaction> consume(int limit, HashSet<byte[]> avoid);  }### Answer:
@Test public void inject() { pool.clear(); pool.inject(tx1); pool.inject(tx2); Assert.assertTrue(pool.isKnown(tx1.getHash())); Assert.assertTrue(pool.isKnown(tx2.getHash())); }