Divert extends Processor { @Override public Divert duplicate(boolean with_state) { return new Divert(); } Divert(); Divert divertTo(int index); @Override Divert duplicate(boolean with_state); @Override synchronized void setPushableOutput(int i, /*@ non_null @*/ Pushable p); @Override Pushable getPushableInput(int index); @Override Pullable getPullableOutput(int index);  }
@Test public void testDuplicate1() { Divert div = new Divert(); Divert div_dup = div.duplicate(false); assertNotNull(div_dup); assertNotEquals(div, div_dup); }
@Test public void testDuplicate2() { Divert div = new Divert(); Divert div_dup = div.duplicate(true); assertNotNull(div_dup); assertNotEquals(div, div_dup); }