TriggerLocation extends Trigger { @Override public Trigger duplicate() { return new TriggerLocation(this); } TriggerLocation(); private  TriggerLocation(TriggerLocation triggerLocation); @Override synchronized boolean shouldRun(); @Override synchronized String toJSON(); @Override int friendlyName(); @Override String friendlyDescription(); @Override Optional<Integer> icon(); @Override Trigger duplicate(); @Override void generateDialog(LinearLayout root, FragmentManager fragmentManager);  }
@Test public void copyConstructorTest() { TriggerLocation t = new TriggerLocation(); t.latitude.setValue(213); t.longitude.setValue(212); t.distance.setValue(2); t.modeSelected.setValue(InputLocationMode.Mode.INSIDE); TriggerLocation t1 = (TriggerLocation) t.duplicate(); Assert.assertEquals(213d, t1.latitude.getValue(), 0.01d); Assert.assertEquals(212d, t1.longitude.getValue(), 0.01d); Assert.assertEquals(2d, t1.distance.getValue(), 0.01d); Assert.assertEquals(InputLocationMode.Mode.INSIDE, t1.modeSelected.getValue()); }