/**
  * Test method for {@link KNXNetworkMonitorFT12#close()}.
  *
  * @throws InterruptedException on interrupted thread
  */
 @Test
 public final void testClose() throws InterruptedException {
   System.out.println(mon.toString());
   assertTrue(mon.isOpen());
   mon.close();
   // time for link event notifier
   Thread.sleep(50);
   assertTrue(lmon.closed);
   assertFalse(mon.isOpen());
   mon.close();
   System.out.println(mon.toString());
 }
 /**
  * Test method for {@link KNXNetworkMonitorFT12#KNXNetworkMonitorFT12(int,
  * medium.KNXMediumSettings)}.
  */
 @Test
 public final void testKNXNetworkMonitorFT12IntKNXMediumSettings() {
   mon.close();
   try {
     mon = new KNXNetworkMonitorFT12(1055, TPSettings.TP1);
     fail("should fail");
   } catch (final KNXException e) {
     System.out.println(e.getMessage());
   }
 }
 /** Test method for {@link KNXNetworkMonitorFT12#getName()}. */
 @Test
 public final void testGetName() {
   String n = mon.getName();
   final String port = Util.getSerialPortID();
   assertTrue(n.indexOf(port) > -1, port);
   assertTrue(n.indexOf("monitor") > -1);
   mon.close();
   n = mon.getName();
   assertNotNull(n);
   assertTrue(n.indexOf("monitor") > -1);
 }
 /**
  * Test method for {@link KNXNetworkMonitorFT12#KNXNetworkMonitorFT12(java.lang.String,
  * medium.KNXMediumSettings)}.
  *
  * @throws KNXException
  */
 @Test
 public final void testKNXNetworkMonitorFT12StringKNXMediumSettings() throws KNXException {
   mon.close();
   mon = new KNXNetworkMonitorFT12(Util.getSerialPortID(), TPSettings.TP1);
 }
 @AfterEach
 void tearDown() throws Exception {
   if (mon != null) mon.close();
 }