### Question:
NodeManagerCollector extends AbstractActivityCollector implements INodeMessageListener { @Handler @Override public void onNodeDisconnected(NodeDisconnectMessage message) { ActivityItem item = ActivityItem.create() .setTitle("Node disconnected.") .setDescription("Node disconnected from thet network."); getActivityLogger().addActivityItem(item); } @Inject protected  NodeManagerCollector(ActivityLogger activityLogger); @Handler @Override void onNodeConnected(NodeConnectMessage message); @Handler @Override void onNodeDisconnected(NodeDisconnectMessage message);  }### Answer:
@Test public void testOnNodeDisconnected() { NodeDisconnectMessage msg = new NodeDisconnectMessage(); collector.onNodeDisconnected(msg); CollectorTestUtils.captureAddActivityItem(ActivityType.INFORMATION, activityLogger); }