FinishedTriggersSet implements FinishedTriggers { @Override public FinishedTriggersSet copy() { return fromSet(Sets.newHashSet(finishedTriggers)); } private  FinishedTriggersSet(Set<ExecutableTriggerStateMachine> finishedTriggers); static FinishedTriggersSet fromSet(Set<ExecutableTriggerStateMachine> finishedTriggers); Set<ExecutableTriggerStateMachine> getFinishedTriggers(); @Override boolean isFinished(ExecutableTriggerStateMachine trigger); @Override void setFinished(ExecutableTriggerStateMachine trigger, boolean value); @Override void clearRecursively(ExecutableTriggerStateMachine trigger); @Override FinishedTriggersSet copy();  }
@Test public void testCopy() throws Exception { FinishedTriggersSet finishedSet = FinishedTriggersSet.fromSet(new HashSet<>()); assertThat( finishedSet.copy().getFinishedTriggers(), not(theInstance(finishedSet.getFinishedTriggers()))); }