@Test void getList() { assertTrue(defaultRepository.getList(UUID_1).isPresent()); assertTrue(defaultRepository.getList(UUID_2).isPresent()); assertTrue(defaultRepository.getList(UUID_3).isPresent()); assertEquals(2, defaultRepository.getList(UUID_2).get().getShoppingItems().length); }
public Optional<GroceryList> getList(UUID id) { return groceryLists.stream() .filter(entry -> entry != null && id.equals(entry.getId())) .findFirst(); }
Repository { public Optional<GroceryList> getList(UUID id) { return groceryLists.stream() .filter(entry -> entry != null && id.equals(entry.getId())) .findFirst(); } }
Repository { public Optional<GroceryList> getList(UUID id) { return groceryLists.stream() .filter(entry -> entry != null && id.equals(entry.getId())) .findFirst(); } Repository();  Repository(String repoFilePath); }
Repository { public Optional<GroceryList> getList(UUID id) { return groceryLists.stream() .filter(entry -> entry != null && id.equals(entry.getId())) .findFirst(); } Repository();  Repository(String repoFilePath); synchronized UUID createList(GroceryList groceryList); Optional<GroceryList> getList(UUID id); GroceryLists getLists(); synchronized boolean updateList(UUID uuid, GroceryList updatedList); synchronized boolean deleteList(UUID uuid); }
Repository { public Optional<GroceryList> getList(UUID id) { return groceryLists.stream() .filter(entry -> entry != null && id.equals(entry.getId())) .findFirst(); } Repository();  Repository(String repoFilePath); synchronized UUID createList(GroceryList groceryList); Optional<GroceryList> getList(UUID id); GroceryLists getLists(); synchronized boolean updateList(UUID uuid, GroceryList updatedList); synchronized boolean deleteList(UUID uuid);  }