HeartbeatEvent extends AdapterLifecycleEvent implements LoggableEvent { public void extractState(Adapter adapter) { adapterStateSummary = new AdapterStateSummary(adapter); } HeartbeatEvent(); long getHeartbeatTime(); void setHeartbeatTime(long l); void extractState(Adapter adapter); AdapterStateSummary getAdapterStateSummary(); void setAdapterStateSummary(AdapterStateSummary a); @Override void logEvent(Logger logger);  }
@Test public void testExtractState() throws Exception { Adapter adapter = new Adapter(); adapter.setUniqueId("MyAdapter"); Channel channel = new Channel(); channel.setUniqueId("MyChannel"); adapter.getChannelList().add(channel); event.extractState(adapter); assertEquals("MyAdapter", event.getAdapterStateSummary().getAdapterState().getKey()); }