Repository { public Optional<GroceryList> getList(UUID id) { return groceryLists.stream() .filter(entry -> entry != null && id.equals(entry.getId())) .findFirst(); } @Inject  Repository(@Named("datastore") File dataFile, ModelSerializer serializer); UUID createList(GroceryList groceryList); Optional<GroceryList> getList(UUID id); GroceryLists getLists(); boolean updateList(UUID uuid, GroceryList updatedList); boolean deleteList(UUID uuid);  }
@Test public void getList() { assertTrue("#1", defaultRepository.getList(UUID_1).isPresent()); assertTrue("#2", defaultRepository.getList(UUID_2).isPresent()); assertTrue("#3", defaultRepository.getList(UUID_3).isPresent()); assertEquals(2, defaultRepository.getList(UUID_2).get().getShoppingItems().length); }