### Question:
DashboardData { void unregister() { this.downstream.unregister(); } 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 unsubscribesFromEventBus() { EventBus eventBus = mock(EventBus.class); MemoryBackedRegistry<BackendService> backendServicesRegistry = new MemoryBackedRegistry<>(); backendServicesRegistry.add(application("app", origin("app-01", "localhost", 9090))); backendServicesRegistry.add(application("test", origin("test-01", "localhost", 9090))); DashboardData dashbaord = new DashboardData(metricRegistry, backendServicesRegistry, "styx-prod1-presentation-01", new Version("releaseTag"), eventBus); verify(eventBus, times(4)).register(any(DashboardData.Origin.class)); dashbaord.unregister(); verify(eventBus, times(4)).unregister(any(DashboardData.Origin.class)); }