@Test
public void resolvesDynamicPropertyOnEachCall() {

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