### Question:
ToolboxDomainLookups { public CommonDomainLookups get(final String definitionSetId) { CommonDomainLookups lookup = domainLookups.get(definitionSetId); if (null == lookup) { lookup = domainLookupInstances.get(); lookup.setDomain(definitionSetId); domainLookups.put(definitionSetId, lookup); } return lookup; } protected  ToolboxDomainLookups(); @Inject  ToolboxDomainLookups(final ManagedInstance<CommonDomainLookups> domainLookupInstances); CommonDomainLookups get(final String definitionSetId); @PreDestroy void destroy();  }### Answer:
@Test public void testGetCached() { String dsId = "ds1"; CommonDomainLookups lookups = tested.get(dsId); CommonDomainLookups lookups1 = tested.get(dsId); assertEquals(domainLookups, lookups); verify(domainLookups, times(1)).setDomain(eq(dsId)); }