### Question:
DexCloseOrderTransaction extends DEX { @Override public boolean isDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates) { DexCloseOrderAttachment attachment = (DexCloseOrderAttachment) transaction.getAttachment(); return isDuplicate(DEX.DEX_CLOSE_ORDER, Long.toUnsignedString(attachment.getContractId()), duplicates, true); }  @Override byte getSubtype(); @Override LedgerEvent getLedgerEvent(); @Override AbstractAttachment parseAttachment(ByteBuffer buffer); @Override AbstractAttachment parseAttachment(JSONObject attachmentData); @Override void validateAttachment(Transaction tx); @Override boolean applyAttachmentUnconfirmed(Transaction transaction, Account senderAccount); @Override void applyAttachment(Transaction transaction, Account senderAccount, Account recipientAccount); @Override void undoAttachmentUnconfirmed(Transaction transaction, Account senderAccount); @Override boolean isDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates); @Override boolean canHaveRecipient(); @Override boolean isPhasingSafe(); @Override String getName();  }### Answer:
@Test void testIsDuplicate() { Transaction tx = mock(Transaction.class); doReturn(attachment).when(tx).getAttachment(); HashMap<TransactionType, Map<String, Integer>> duplicates = new HashMap<>(); assertFalse(transactionType.isDuplicate(tx, duplicates)); assertTrue(transactionType.isDuplicate(tx, duplicates)); assertTrue(transactionType.isDuplicate(tx, duplicates)); }