DefaultMetaGatherer implements MetaGatherer { @Override public synchronized Model.MetaInfo info() { return MetaInfoBuilder.from(metaInfo) .serviceUptime((System.currentTimeMillis() - startTime) / 1000.0) .build(); } DefaultMetaGatherer(Model.MetaInfo metaInfo);   DefaultMetaGatherer(Model.MetaInfo metaInfo, Config config);   DefaultMetaGatherer(int sizeLimit, Model.MetaInfo metaInfo, @Nullable Config config); @Override synchronized Model.MetaInfo info(); @Override synchronized Model.LoadedConfig loadedConfig(); @Override synchronized Model.EndpointsInfo endpoints(); @Override synchronized Model.ExternalCallsInfo calls(); @Override CallsGatherer getServiceCallsGatherer(); @Override CallsGatherer getIncomingCallsGatherer(String service); @Override CallsGatherer getOutgoingCallsGatherer(String service); static final int DEFAULT_SIZE_LIMIT; static final String OVER_SIZE_KEY; }
@Test public void testInfo() throws InterruptedException { Thread.sleep(10); Model.MetaInfo metaInfo = gatherer.info(); assertThat(metaInfo.componentId(), is("freight-container")); assertThat(metaInfo.buildVersion(), is(buildVersion)); assertThat(metaInfo.containerVersion(), is(containerVersion)); assertThat(metaInfo.serviceUptime(), is(greaterThan(0.0))); assertThat(metaInfo.systemVersion(), is(notNullValue())); }