### Question:
CollectionChangeListener implements
		ICollectionChangeListener { @Override public boolean monitorOneOf(ChangedCollections changedCollections) { SortedSet<String> collectionPathSet = convertSetToComparePath(changedCollections); return !Sets.intersection( Sets.newHashSet(Iterables.transform(getMonitoredCollections(), new Function<AnalysedSyncCollection, String>() { @Override public String apply(AnalysedSyncCollection input) { return input.getCollectionPath(); } })) , collectionPathSet).isEmpty(); } CollectionChangeListener(UserDataRequest udr,
			IContinuation c, 
			Set<AnalysedSyncCollection> monitoredCollections); @Override IContinuation getContinuation(); @Override Set<AnalysedSyncCollection> getMonitoredCollections(); @Override UserDataRequest getSession(); void changesDetected(); @Override boolean monitorOneOf(ChangedCollections changedCollections);  }### Answer:
@Test public void testMonitorOf() { String matchString = "mypath"; Set<AnalysedSyncCollection> monitored = ImmutableSet.of( AnalysedSyncCollection.builder() .collectionId(CollectionId.of(1)) .collectionPath(matchString) .syncKey(new SyncKey("1")) .build(), AnalysedSyncCollection.builder() .collectionId(CollectionId.of(2)) .collectionPath("another") .syncKey(new SyncKey("2")) .build()); Set<String> notify = ImmutableSet.of(matchString); CollectionChangeListener collectionChangeListener = new CollectionChangeListener(null, null, monitored); ChangedCollections changed = new ChangedCollections(new Date(), notify); boolean result = collectionChangeListener.monitorOneOf(changed); assertThat(result).isTrue(); }
@Test public void testMonitorOfDontMatch() { Set<AnalysedSyncCollection> monitored = ImmutableSet.of( AnalysedSyncCollection.builder() .collectionId(CollectionId.of(1)) .collectionPath("an") .syncKey(new SyncKey("1")) .build(), AnalysedSyncCollection.builder() .collectionId(CollectionId.of(2)) .collectionPath("other") .syncKey(new SyncKey("2")) .build()); Set<String> notify = ImmutableSet.of("anotherString"); CollectionChangeListener collectionChangeListener = new CollectionChangeListener(null, null, monitored); ChangedCollections changed = new ChangedCollections(new Date(), notify); boolean result = collectionChangeListener.monitorOneOf(changed); assertThat(result).isFalse(); }