AmazonItemLookUp { public AmazonItem[] updateAmazonItems() { if (this.mAmazonItems == null) { return getAmazonItems(); } Float[] prices = getPrices(this.mDocuments); for (int i = 0; i < this.mAmazonItems.length; i++) { if (this.mDocuments[i] == null) { this.mAmazonItems[i] = null; } else { this.mAmazonItems[i] = this.mAmazonItems[i].updateItem(prices[i]); } } return this.mAmazonItems; } AmazonItemLookUp(String[] urls);  AmazonItemLookUp(AmazonItem[] amazonItems, Integer maxDelay); AmazonItem[] getAmazonItems(); AmazonItem[] updateAmazonItems();  }
@Test public void updateAmazonItemsTest() { AmazonItem[] items = new AmazonItemLookUp(itemsExamples).getAmazonItems(); AmazonItemLookUp itemLookUp = new AmazonItemLookUp(items, 500); AmazonItem[] updatedItems = itemLookUp.updateAmazonItems(); }