@Test public void populateEurekaMetadaFromSnitch() { populator.populate(); Assertions.assertThat(metadata).isNotEmpty(); Assertions.assertThat(metadata).containsEntry(CereebroMetadata.KEY_SNITCH_URI, DEFAULT_URL); }
public void populate() { try { Map<String, String> metadata = appInfoManager.getEurekaInstanceConfig().getMetadataMap(); metadata.put(CereebroMetadata.KEY_SNITCH_URI, getEndpointUri().toString()); String frag = objectMapper.writeValueAsString(snitch.snitch()); metadata.put(CereebroMetadata.KEY_SNITCH_SYSTEM_FRAGMENT_JSON, frag); appInfoManager.registerAppMetadata(metadata); } catch (IOException e) { throw new SnitchingException(snitch.getUri(), "Error while serializing fragment", e); } }
EurekaMetadataPopulator { public void populate() { try { Map<String, String> metadata = appInfoManager.getEurekaInstanceConfig().getMetadataMap(); metadata.put(CereebroMetadata.KEY_SNITCH_URI, getEndpointUri().toString()); String frag = objectMapper.writeValueAsString(snitch.snitch()); metadata.put(CereebroMetadata.KEY_SNITCH_SYSTEM_FRAGMENT_JSON, frag); appInfoManager.registerAppMetadata(metadata); } catch (IOException e) { throw new SnitchingException(snitch.getUri(), "Error while serializing fragment", e); } } }
EurekaMetadataPopulator { public void populate() { try { Map<String, String> metadata = appInfoManager.getEurekaInstanceConfig().getMetadataMap(); metadata.put(CereebroMetadata.KEY_SNITCH_URI, getEndpointUri().toString()); String frag = objectMapper.writeValueAsString(snitch.snitch()); metadata.put(CereebroMetadata.KEY_SNITCH_SYSTEM_FRAGMENT_JSON, frag); appInfoManager.registerAppMetadata(metadata); } catch (IOException e) { throw new SnitchingException(snitch.getUri(), "Error while serializing fragment", e); } } EurekaMetadataPopulator(SnitchEndpoint snitch, ApplicationInfoManager manager,
            EurekaInstanceSnitchProperties props, ObjectMapper mapper); }
EurekaMetadataPopulator { public void populate() { try { Map<String, String> metadata = appInfoManager.getEurekaInstanceConfig().getMetadataMap(); metadata.put(CereebroMetadata.KEY_SNITCH_URI, getEndpointUri().toString()); String frag = objectMapper.writeValueAsString(snitch.snitch()); metadata.put(CereebroMetadata.KEY_SNITCH_SYSTEM_FRAGMENT_JSON, frag); appInfoManager.registerAppMetadata(metadata); } catch (IOException e) { throw new SnitchingException(snitch.getUri(), "Error while serializing fragment", e); } } EurekaMetadataPopulator(SnitchEndpoint snitch, ApplicationInfoManager manager,
            EurekaInstanceSnitchProperties props, ObjectMapper mapper); void populate(); }
EurekaMetadataPopulator { public void populate() { try { Map<String, String> metadata = appInfoManager.getEurekaInstanceConfig().getMetadataMap(); metadata.put(CereebroMetadata.KEY_SNITCH_URI, getEndpointUri().toString()); String frag = objectMapper.writeValueAsString(snitch.snitch()); metadata.put(CereebroMetadata.KEY_SNITCH_SYSTEM_FRAGMENT_JSON, frag); appInfoManager.registerAppMetadata(metadata); } catch (IOException e) { throw new SnitchingException(snitch.getUri(), "Error while serializing fragment", e); } } EurekaMetadataPopulator(SnitchEndpoint snitch, ApplicationInfoManager manager,
            EurekaInstanceSnitchProperties props, ObjectMapper mapper); void populate();  }