@Override public DeltasAccess open(WaveletName waveletName) { Map<WaveletId, MemoryDeltaCollection> waveData = getOrCreateWaveData(waveletName.waveId); MemoryDeltaCollection collection = waveData.get(waveletName.waveletId); if (collection == null) { collection = new MemoryDeltaCollection(waveletName); waveData.put(waveletName.waveletId, collection); } return collection; }
@Override protected DeltaStore newDeltaStore() throws IOException { return new MemoryDeltaStore(); } }
@Override protected CertPathStore newCertPathStore() { this.memoryStore = new MemoryStore(); return memoryStore; } }
@Override public ImmutableSet<WaveletId> lookup(WaveId waveId) { Map<WaveletId, MemoryDeltaCollection> waveData = data.get(waveId); if (waveData == null) { return ImmutableSet.of(); } else { ImmutableSet.Builder<WaveletId> builder = ImmutableSet.builder(); for (MemoryDeltaCollection collection : waveData.values()) { if (!collection.isEmpty()) { builder.add(collection.getWaveletName().waveletId); } } return builder.build(); } }
@Override public HashedVersion getAppliedAtVersion(long version) throws InvalidProtocolBufferException { WaveletDeltaRecord delta = getDelta(version); return (delta != null) ? delta.getAppliedAtVersion() : null; }
@Override protected AccountStore newAccountStore() { return new MemoryStore(); } }
@Override protected DeltaStore newDeltaStore() throws IOException { return new MemoryDeltaStore(); } }
@Override public ByteStringMessage<ProtocolAppliedWaveletDelta> getAppliedDelta(long version) { WaveletDeltaRecord delta = getDelta(version); return (delta != null) ? delta.getAppliedDelta() : null; }
@Override protected AccountStore newAccountStore() { return new MemoryStore(); } }
@Override public void setUp() throws Exception { store = new MemoryDeltaStore(); super.setUp(); }
@Override public TransformedWaveletDelta getTransformedDelta(long version) { WaveletDeltaRecord delta = getDelta(version); return (delta != null) ? delta.getTransformedDelta() : null; }
@Override protected CertPathStore newCertPathStore() { this.memoryStore = new MemoryStore(); return memoryStore; } }
@Override public void setUp() throws Exception { store = new MemoryDeltaStore(); super.setUp(); }
@Override public HashedVersion getResultingVersion(long version) { WaveletDeltaRecord delta = getDelta(version); return (delta != null) ? delta.getTransformedDelta().getResultingVersion() : null; }
@Override protected void setUp() throws Exception { MockitoAnnotations.initMocks(this); store = new MemoryStore(); store.putAccount(account); }
@Override protected void setUp() throws Exception { MockitoAnnotations.initMocks(this); store = new MemoryStore(); store.putAccount(account); }
@Override protected void setUp() throws Exception { accountStore = new MemoryStore(); accountAttachmentStore = mock(AccountAttachmentStore.class); when( accountAttachmentStore.storeAvatar((ParticipantId) anyObject(), anyString(), anyString(), anyString())).thenReturn("image/png;image.png"); sessionManager = mock(SessionManager.class); service = new AccountService(sessionManager, accountStore, accountAttachmentStore, "example.com"); }
@Override protected void setUp() throws Exception { MockitoAnnotations.initMocks(this); AccountStore store = new MemoryStore(); account = new HumanAccountDataImpl(ParticipantId.ofUnsafe("tubes@example.com")); store.putAccount(account); sessionManager = new SessionManagerImpl(store, jettySessionManager); }
@Override protected void setUp() throws Exception { super.setUp(); store = new MemoryStore(); config = ConfigFactory.parseString("federation.waveserver_disable_verification : " + false); manager = new CertificateManagerImpl(config, getSigner(), getVerifier(store, true), store); ticker = new Ticker(); }
@Override protected void setUp() throws Exception { super.setUp(); store = new MemoryStore(); config = ConfigFactory.parseString("federation.waveserver_disable_verification : " + false); manager = new CertificateManagerImpl(config, getSigner(), getVerifier(store, true), store); ticker = new Ticker(); }