### Question:
MessageQueueHealthManager { public void markQueueFault(MessageQueue mq) { faultMap.put(mq, System.currentTimeMillis() + isoTime); if (LOGGER.isDebugEnabled()) { LOGGER.debug("mark queue {} fault for time {}", mq, isoTime); } } MessageQueueHealthManager(long isoTime); void markQueueFault(MessageQueue mq); void markQueueHealthy(MessageQueue mq); boolean isQueueFault(MessageQueue mq); boolean isQueueHealthy(MessageQueue mq); static final Logger LOGGER; final ConcurrentHashMap<MessageQueue, Long/*isolate expire timestamp*/> faultMap; }### Answer:
@Test public void testMarkQueueFault() throws Exception { MessageQueue mq = new MessageQueue("topic1", "brokerName1", 0); messageQueueHealthManager.markQueueFault(mq); assertTrue(messageQueueHealthManager.isQueueFault(mq)); Thread.sleep(isoTime + 10); assertFalse(messageQueueHealthManager.isQueueFault(mq)); }