@Test
void should_be_set_metadata_when_exists_property() {

    final Map<String, Object> metadata = new HashMap<>();
    metadata.put("evcache.availability-zone", "test1");
    metadata.put("evcache.ami-id", "test2");
    metadata.put("evcache.instance-id", "test3");
    metadata.put("evcache.public-hostname", "test4");
    metadata.put("evcache.public-ipv4", "test5");
    metadata.put("evcache.local-ipv4", "test6");
    environment.getPropertySources().addLast(new MapPropertySource("test", metadata));
    assertThat(processor.postProcessAfterInitialization(eurekaInstanceConfigBean, "beanName"))
        .isEqualTo(eurekaInstanceConfigBean);
    final AmazonInfo dataCenterInfo = (AmazonInfo) eurekaInstanceConfigBean.getDataCenterInfo();
    assertThat(dataCenterInfo.getMetadata()).containsEntry("availability-zone", "test1")
                                            .containsEntry("ami-id", "test2")
                                            .containsEntry("instance-id", "test3")
                                            .containsEntry("public-hostname", "test4")
                                            .containsEntry("public-ipv4", "test5")
                                            .containsEntry("local-ipv4", "test6");
}