### Question:
Inventory { public SkuDetails getSkuDetails(String sku) { return mSkuMap.get(sku); }  SkuDetails getSkuDetails(String sku); Collection<SkuDetails> getSkuDetails(); Purchase getPurchase(String sku); boolean hasPurchase(String sku); boolean hasDetails(String sku); void erasePurchase(String sku); List<String> getAllOwnedSkus(); List<String> getAllOwnedSkus(ItemType itemType); List<Purchase> getAllPurchases(); void addSkuDetails(SkuDetails d); void addPurchase(Purchase p); @Override String toString();  }### Answer:
@Test public void testGetSkuDetails() throws Exception { Inventory inventory = new Inventory(); SkuDetails details = mock(SkuDetails.class); when(details.getSku()).thenReturn("sku1"); assertThat(inventory.hasDetails("sku1")).isFalse(); inventory.addSkuDetails(details); assertThat(inventory.getSkuDetails("sku1")).isSameAs(details); }