### Question:
Facts implements Iterable<Fact<?>> { public Fact<?> getFact(String factName) { Objects.requireNonNull(factName, "fact name must not be null"); return facts.stream() .filter(fact -> fact.getName().equals(factName)) .findFirst() .orElse(null); }  void put(String name, T value); void add(Fact<T> fact); void remove(String factName); void remove(Fact<T> fact); @SuppressWarnings("unchecked") T get(String factName); Fact<?> getFact(String factName); Map<String, Object> asMap(); @Override Iterator<Fact<?>> iterator(); void clear(); @Override String toString();  }### Answer:
@Test public void testGetFact() { Fact<Integer> fact = new Fact<>("foo", 1); facts.add(fact); Fact<?> retrievedFact = facts.getFact("foo"); assertThat(retrievedFact).isEqualTo(fact); }