/** Test of setPeriods method, of class PhoneSignalDetector. */
  @Test
  public void testSetPeriods() throws Exception {
    det.start();
    gen.start();

    semaphore.tryAcquire(10, TimeUnit.SECONDS);

    assertTrue("Event not detected", evtDetected);
  }