@Test public void testAddPurchase() throws Exception {

    Inventory inventory = new Inventory();
    inventory.addPurchase(mock(Purchase.class));
    assertThat(inventory.getAllPurchases()).hasSize(1);
}