### Question:
Facts implements Iterable<Fact<?>> { @SuppressWarnings("unchecked") public <T> T get(String factName) { Objects.requireNonNull(factName, "fact name must not be null"); Fact<?> fact = getFact(factName); if (fact != null) { return (T) fact.getValue(); } return 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 testGet() { Fact<Integer> fact = new Fact<>("foo", 1); facts.add(fact); Integer value = facts.get("foo"); assertThat(value).isEqualTo(1); }