### Question:
HeapImpl implements Heap { @Override public <T> T resolve(final JsonValue reference, final Class<T> type) throws HeapException { return resolve(reference, type, false); } HeapImpl();   HeapImpl(final HeapImpl parent);  HeapImpl(final Name name);  HeapImpl(final HeapImpl parent, final Name name); synchronized void init(JsonValue config, String... reservedFieldNames); void addDefaultDeclaration(final JsonValue object); @Override List<T> getAll(final Class<T> type); @Override T get(final String name, final Class<T> type); @Override T resolve(final JsonValue reference, final Class<T> type); @Override T resolve(final JsonValue reference, final Class<T> type, final boolean optional); static String name(final JsonValue declaration); synchronized void put(final String name, final Object object); synchronized void destroy(); Handler getHandler();  }### Answer:
@Test public void testThatPerformingResolutionMultipleTimesReturnsTheSameObject() throws Exception { HeapImpl heap = buildDefaultHeap(); JsonValue bookDefinition = json(object(field("type", Book.class.getName()))); Book first = heap.resolve(bookDefinition, Book.class); Book second = heap.resolve(bookDefinition, Book.class); assertThat(first).isSameAs(second); }