final ResolutionLogger logger = Mockito.mock(ResolutionLogger.class);
final Position logged = new LoggedResolutionPosition(position, logger);
final Security security = Mockito.mock(Security.class);
Mockito.when(security.getUniqueId()).thenReturn(UniqueId.of("Foo", "Bar", "Cow"));
Mockito.when(position.getSecurity()).thenReturn(security);
Mockito.when(position.getSecurityLink()).thenReturn(new SimpleSecurityLink(ExternalId.of("Foo", "Bar")));
assertSame(logged.getSecurity(), security);
Mockito.verify(logger).log(new ComputationTargetRequirement(ComputationTargetType.SECURITY, ExternalId.of("Foo", "Bar")), UniqueId.of("Foo", "Bar", "Cow"));
Mockito.verifyNoMoreInteractions(logger);
}