@Test(expectedExceptions = UnsupportedOperationException.class) public void testHandleHeartbeat_shouldNotBeHandled() throws IOException { CacheConfig.setMetricsReporters(conf, ""); try (BookKeeperMetrics bookKeeperMetrics = new BookKeeperMetrics(conf, new MetricRegistry())) { final WorkerBookKeeper workerBookKeeper = new WorkerBookKeeper(conf, bookKeeperMetrics); workerBookKeeper.handleHeartbeat("", new HeartbeatStatus()); } }
@Override public void handleHeartbeat(String workerHostname, HeartbeatStatus request) { throw new UnsupportedOperationException("Worker node should not handle heartbeat"); }
WorkerBookKeeper extends BookKeeper { @Override public void handleHeartbeat(String workerHostname, HeartbeatStatus request) { throw new UnsupportedOperationException("Worker node should not handle heartbeat"); } }
WorkerBookKeeper extends BookKeeper { @Override public void handleHeartbeat(String workerHostname, HeartbeatStatus request) { throw new UnsupportedOperationException("Worker node should not handle heartbeat"); } WorkerBookKeeper(Configuration conf, BookKeeperMetrics bookKeeperMetrics);  WorkerBookKeeper(Configuration conf, BookKeeperMetrics bookKeeperMetrics, BookKeeperFactory factory); }
WorkerBookKeeper extends BookKeeper { @Override public void handleHeartbeat(String workerHostname, HeartbeatStatus request) { throw new UnsupportedOperationException("Worker node should not handle heartbeat"); } WorkerBookKeeper(Configuration conf, BookKeeperMetrics bookKeeperMetrics);  WorkerBookKeeper(Configuration conf, BookKeeperMetrics bookKeeperMetrics, BookKeeperFactory factory); @Override void handleHeartbeat(String workerHostname, HeartbeatStatus request); }
WorkerBookKeeper extends BookKeeper { @Override public void handleHeartbeat(String workerHostname, HeartbeatStatus request) { throw new UnsupportedOperationException("Worker node should not handle heartbeat"); } WorkerBookKeeper(Configuration conf, BookKeeperMetrics bookKeeperMetrics);  WorkerBookKeeper(Configuration conf, BookKeeperMetrics bookKeeperMetrics, BookKeeperFactory factory); @Override void handleHeartbeat(String workerHostname, HeartbeatStatus request);  }