@Test
void applyShouldReturnOneResourceIfValueSelectorMatchesOneElmentThatContainsThePropertySelectedByTheNameSelector() {

    // Arrange
    ResourceCreatorConfiguration configuration = createSelectorTestConfiguration("$.name", "$.tmp");
    CompiledResourceCreatorConfiguration compiledResourceCreatorConfiguration = new CompiledResourceCreatorConfiguration(configuration);
    TerraformResource terraformResource = mockSelectorTestResource("{ \"foo\": \"bar\", \"tmp\": { \"a\": 1, \"b\": 2, \"name\": \"i am a name\" } }");
    // Act
    Collection<VirtualTerraformResource> results = compiledResourceCreatorConfiguration.apply(terraformResource);
    // Verrify
    assertThat(results).hasSize(1);
    Optional<VirtualTerraformResource> resourceOptional = results.stream().findFirst();
    assertThat(resourceOptional).isPresent();
    VirtualTerraformResource resource = resourceOptional.get();
    assertThat(resource.getOriginalResource()).isSameAs(terraformResource);
    assertThat(resource.getName()).isEqualTo("i am a name");
    Map<String, Object> values = resource.getValues();
    assertThat(values.get("a")).isEqualTo(1d);
    assertThat(values.get("b")).isEqualTo(2d);
    assertThat(values.get("name")).isEqualTo(resource.getName());
}