@Test public void testToString() { ClassToInstanceStore<CharSequence> ctis = new ClassToInstanceStore<>(); ctis.putInstance("MyValue"); ctis.putInstance(new StringBuilder("Some value")); String result = ctis.toString(); assertThat(result, containsString("MyValue")); assertThat(result, containsString("Some value")); }
@Override public String toString() { return backingMap.toString(); }
ClassToInstanceStore { @Override public String toString() { return backingMap.toString(); } }
ClassToInstanceStore { @Override public String toString() { return backingMap.toString(); }  }
ClassToInstanceStore { @Override public String toString() { return backingMap.toString(); }  @SafeVarargs static ClassToInstanceStore<T> create(T... instances); Optional<U> getInstance(Class<U> clazz); Optional<U> putInstance(Class<? extends U> clazz, U instance); Optional<U> removeInstance(Class<U> clazz); void putAll(ClassToInstanceStore<? extends T> toCopy); boolean containsKey(Class<? extends T> clazz); boolean isEmpty(); @SuppressWarnings("unchecked") Optional<U> putInstance(U instance); Collection<T> values(); Collection<Class<? extends T>> keys(); @Override String toString(); }
ClassToInstanceStore { @Override public String toString() { return backingMap.toString(); }  @SafeVarargs static ClassToInstanceStore<T> create(T... instances); Optional<U> getInstance(Class<U> clazz); Optional<U> putInstance(Class<? extends U> clazz, U instance); Optional<U> removeInstance(Class<U> clazz); void putAll(ClassToInstanceStore<? extends T> toCopy); boolean containsKey(Class<? extends T> clazz); boolean isEmpty(); @SuppressWarnings("unchecked") Optional<U> putInstance(U instance); Collection<T> values(); Collection<Class<? extends T>> keys(); @Override String toString();  }