InbandGeneratorImpl extends AbstractSource implements DtmfGenerator { @Override public void stop() { } InbandGeneratorImpl(String name, SyncSource syncSource); void setDigit(String digit); String getDigit(); void setToneDuration(int duration); int getToneDuration(); int getVolume(); void setVolume(int volume); Format getFormat(); Format[] getFormats(); @Override void evolve(Buffer buffer, long timestamp, long seq); @Override void stop(); final static String[][] events; }
@Test @SuppressWarnings("static-access") public void testDigit0() throws Exception { gen.connect(det); gen.start(); det.start(); Thread.currentThread().sleep(2000); gen.stop(); det.stop(); Thread.currentThread().sleep(1000); assertTrue(verify(s, new int[]{941, 1336})); }