### Question:
BoltConnectionQueueMonitorAggregate implements BoltConnectionQueueMonitor { @Override public void enqueued( BoltConnection to, Job job ) { monitors.forEach( m -> m.enqueued( to, job ) ); } BoltConnectionQueueMonitorAggregate( BoltConnectionQueueMonitor... monitors ); @Override void enqueued( BoltConnection to, Job job ); @Override void drained( BoltConnection from, Collection<Job> batch );  }### Answer:
@Test public void shouldCallEnqueuedOnSingleMonitor() { Job job = mock( Job.class ); BoltConnectionQueueMonitor monitor = mock( BoltConnectionQueueMonitor.class ); BoltConnectionQueueMonitorAggregate monitorAggregate = new BoltConnectionQueueMonitorAggregate( monitor ); monitorAggregate.enqueued( connection, job ); verify( monitor ).enqueued( connection, job ); }
@Test public void shouldCallEnqueuedOnEachMonitor() { Job job = mock( Job.class ); BoltConnectionQueueMonitor monitor1 = mock( BoltConnectionQueueMonitor.class ); BoltConnectionQueueMonitor monitor2 = mock( BoltConnectionQueueMonitor.class ); BoltConnectionQueueMonitorAggregate monitorAggregate = new BoltConnectionQueueMonitorAggregate( monitor1, monitor2 ); monitorAggregate.enqueued( connection, job ); verify( monitor1 ).enqueued( connection, job ); verify( monitor2 ).enqueued( connection, job ); }