final ComputationTargetResolver.AtVersionCorrection underlying = Mockito.mock(ComputationTargetResolver.AtVersionCorrection.class);
final ConcurrentMap<ComputationTargetReference, UniqueId> resolutions = new ConcurrentHashMap<ComputationTargetReference, UniqueId>();
final Set<UniqueId> expiredResolutions = new HashSet<UniqueId>();
final ComputationTargetResolver.AtVersionCorrection resolver = TargetResolutionLogger.of(underlying, resolutions, expiredResolutions);
final ComputationTargetSpecification spec = new ComputationTargetSpecification(ComputationTargetType.PRIMITIVE, UniqueId.of("Foo", "Bar"));
final ComputationTarget target = new ComputationTarget(spec.replaceIdentifier(UniqueId.of("Foo", "Bar", "Cow")), new Primitive(UniqueId.of("Foo", "Bar", "Cow")));
Mockito.when(underlying.resolve(spec)).thenReturn(target);
final ObjectResolver shallowResolver = Mockito.mock(ObjectResolver.class);
Mockito.when(underlying.getResolver(spec)).thenReturn(shallowResolver);
assertSame(resolver.resolve(spec), target);
}