@Test
public void resolvesDynamicPropertyDelegatesToStringBasedApi() {

    // given
    String expectedValue = UUID.randomUUID().toString();
    VirtualProperty virtualProperty = VirtualPropertyTest.createDefaultVirtualPropertyBuilder()
            .withValue(expectedValue)
            .withDynamic(true)
            .build();
    Log4j2Lookup lookup = spy(createDefaultTestLog4j2Lookup(createDefaultTestStrSubstitutor()));
    // when
    lookup.resolve(virtualProperty);
    // then
    ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
    verify(lookup, times(1)).resolve(captor.capture());
    Assert.assertEquals(expectedValue, captor.getValue());
}