@Override protected void setUp() throws Exception { super.setUp(); LocalWaveletContainer.Factory localFactory = mock(LocalWaveletContainer.Factory.class); WaveletNotificationSubscriber notifiee = mock(WaveletNotificationSubscriber.class); SettableFuture<ImmutableSet<WaveletId>> lookedupWavelets = SettableFuture.create(); lookedupWavelets.set(ImmutableSet.of(WAVELET_NAME.waveletId)); Wave wave = new Wave( WAVELET_NAME.waveId, lookedupWavelets, notifiee, localFactory, null, WAVELET_NAME.waveId.getDomain()); Map<WaveId, Wave> waves = Maps.newHashMap(); waves.put(WAVELET_NAME.waveId, wave); when(waveMap.getWaves()).thenReturn(waves); ImmutableSet<WaveletId> wavelets = ImmutableSet.of(WAVELET_NAME.waveletId); when(waveMap.lookupWavelets(WAVELET_NAME.waveId)).thenReturn(wavelets); LocalWaveletContainer c = mock(LocalWaveletContainer.class); when(c.hasParticipant(PARTICIPANT)).thenReturn(true); when(waveMap.getLocalWavelet(WAVELET_NAME)).thenReturn(c); }