@Test
 public void testFindLookupAndLoadFeed() {
   assertNotNullOrEmpty(
       String.format(RESOURCE_MISSING_MESSAGE, "Test Query."), TestConstants.TEST_QUERY);
   FindFeedQuery findQuery = factory.newFindFeedQuery();
   FindFeedResult findResult = findQuery.withQuery(TestConstants.TEST_QUERY).singleResult();
   assertNotNull("Find result should not be null or empty.", findResult);
   assertNotNull("Find result should not be null or empty.", findResult.getEntries());
   LookupFeedQuery lookupQuery = factory.newLookupFeedQuery();
   LookupFeedResult lookupResult =
       lookupQuery.withQuery(findResult.getEntries().get(0).getLink()).singleResult();
   assertNotNull("Lookup result should not be null or empty.", lookupResult);
   LoadFeedQuery loadQuery = factory.newLoadFeedQuery();
   LoadFeedResult loadResult = loadQuery.withQuery(lookupResult.getUrl()).singleResult();
   assertNotNull("Load result should not be null or empty.", loadResult);
   assertNotNull("Load result should not be null or empty.", loadResult.getEntries());
 }
コード例 #2
0
 private static void printResponse(LoadFeedResult result) {
   System.out.println(result.getTitle());
   for (FeedEntry entry : result.getEntries()) {
     System.out.println(entry.getTitle());
   }
 }