ClusterStateImpl implements ClusterState, PubsubEvent.EventSubscriber { @Override public Multimap<String, PreemptionVictim> getSlavesToActiveTasks() { synchronized (victims) { return ImmutableSetMultimap.copyOf(victims); } }  @Override Multimap<String, PreemptionVictim> getSlavesToActiveTasks(); @Subscribe void taskChangedState(TaskStateChange stateChange);  }
@Test(expected = UnsupportedOperationException.class) public void testImmutable() { state.getSlavesToActiveTasks().clear(); }