### Question:
MirrorTopicSubscriber extends Thread { void subscribeForTest() { subscribe(); } MirrorTopicSubscriber(String mirrorAddress, int mirrorPort, ConsensusTopicId topicId, Optional<Instant> subscribeFrom, HCSCallBackFromMirror onHCSMessageCallback, boolean testMode); void run();  }### Answer:
@Test public void testMirrorTopicSubscriberNoSubscribeFrom() throws Exception { ConsensusTopicId consensusTopicId = new ConsensusTopicId(1, 2, 3); Optional<Instant> subscribeFrom = Optional.empty(); MirrorTopicSubscriber mirrorTopicSubscriber = new MirrorTopicSubscriber( "mirror", 8080, consensusTopicId, subscribeFrom, null, true); assertEquals("mirror", mirrorTopicSubscriber.getMirrorAddress()); assertEquals(8080, mirrorTopicSubscriber.getMirrorPort()); assertEquals(Optional.empty(), mirrorTopicSubscriber.getSubscribeFrom()); assertEquals(1, mirrorTopicSubscriber.getTopicId().shard); assertEquals(2, mirrorTopicSubscriber.getTopicId().realm); assertEquals(3, mirrorTopicSubscriber.getTopicId().topic); assertDoesNotThrow(() -> {mirrorTopicSubscriber.subscribeForTest();}); }
@Test public void testMirrorTopicSubscriberWithSubscribeFrom() throws Exception { ConsensusTopicId consensusTopicId = new ConsensusTopicId(1, 2, 3); Instant timeNow = Instant.now(); Optional<Instant> subscribeFrom = Optional.of(timeNow); final MirrorTopicSubscriber mirrorTopicSubscriber = new MirrorTopicSubscriber( "mirror", 8080, consensusTopicId, subscribeFrom, null, true); assertEquals("mirror", mirrorTopicSubscriber.getMirrorAddress()); assertEquals(8080, mirrorTopicSubscriber.getMirrorPort()); assertEquals(subscribeFrom, mirrorTopicSubscriber.getSubscribeFrom()); assertEquals(1, mirrorTopicSubscriber.getTopicId().shard); assertEquals(2, mirrorTopicSubscriber.getTopicId().realm); assertEquals(3, mirrorTopicSubscriber.getTopicId().topic); assertDoesNotThrow(() -> {mirrorTopicSubscriber.subscribeForTest();}); }