### Question:
DashboardData { @JsonProperty("server") public Server server() { return server; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); @JsonProperty("server") Server server(); @JsonProperty("downstream") Downstream downstream(); @JsonProperty("publishTime") long publishTime();  }### Answer:
@Test public void providesServerId() { DashboardData dashboardData = newDashboardData("styx-prod1-presentation-01", "releaseTag", backendServicesRegistry); assertThat(dashboardData.server().id(), is("styx-prod1-presentation-01")); }
@Test public void providesVersion() { DashboardData dashboardData = newDashboardData("serverId", "STYX.0.4.283", backendServicesRegistry); assertThat(dashboardData.server().version(), is("0.4.283")); }
@Test public void providesUptime() { metricRegistry.register("jvm.uptime.formatted", gauge("1d 3h 2m")); assertThat(newDashboardData().server().uptime(), is("1d 3h 2m")); }
@Test public void providesStyxErrorResponseCodes() { metricRegistry.counter("styx.response.status.500").inc(111); metricRegistry.counter("styx.response.status.502").inc(222); Map<String, Integer> responses = newDashboardData().server().responses(); assertThat(responses.get("500"), is(111)); assertThat(responses.get("502"), is(222)); assertThat(responses.get("5xx"), is(333)); }