Repository { public GroceryLists getLists() { return groceryLists; } 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);  }
@Test void getLists() { GroceryLists defList = defaultRepository.getLists(); assertEquals(3, defList.size(), "Broken default data?"); assertTrue(defList.stream().map(GroceryList::getId).anyMatch(uuid -> Objects.equals(UUID_2, uuid))); GroceryLists emptyList = emptyRepository.getLists(); assertEquals(0, emptyList.size(), "Empty set not empty?"); }