final MarketDataSnapshotDocument doc2Loaded = _snpMaster.get(doc2.getUniqueId());
assertEquivalent(doc2, doc2Loaded);
// Search by name with data
final MarketDataSnapshotSearchRequest request1 = new MarketDataSnapshotSearchRequest();
request1.setIncludeData(true);
request1.setName(doc1.getName());
final MarketDataSnapshotSearchResult result1 = _snpMaster.search(request1);
assertTrue(result1.getDocuments().size() > 0);
// Search by name without data
final MarketDataSnapshotSearchRequest request2 = new MarketDataSnapshotSearchRequest();
request2.setIncludeData(false);
request2.setName(doc1.getName());
final MarketDataSnapshotSearchResult result2 = _snpMaster.search(request2);
assertTrue(result2.getDocuments().size() > 0);
assertEquals(result1.getDocuments().size(), result2.getDocuments().size());
// Search by ID
final MarketDataSnapshotSearchRequest request3 = new MarketDataSnapshotSearchRequest();
request3.setSnapshotIds(ImmutableSet.of(doc1.getUniqueId().getObjectId()));
final MarketDataSnapshotSearchResult result3 = _snpMaster.search(request3);
assertEquals(1, result3.getDocuments().size());
assertEquals(doc1.getUniqueId(), result3.getFirstDocument().getUniqueId());
}