### Question:
ConsoleBarrierGroups extends LocalBarrierGroups { public ConsoleBarrierGroups(ConsoleCommunication communication) { m_communication = communication; } ConsoleBarrierGroups(ConsoleCommunication communication);   }### Answer:
@Test public void testConsoleBarrierGroups() throws Exception { final ConsoleBarrierGroups barrierGroups = new ConsoleBarrierGroups(m_consoleCommunication); final BarrierGroup bg = barrierGroups.createBarrierGroup("foo"); bg.addBarrier(); verifyNoMoreInteractions(m_consoleCommunication); bg.addWaiter(mock(BarrierIdentity.class)); verify(m_consoleCommunication).sendToAgents(m_messageCaptor.capture()); assertEquals("foo", ((OpenBarrierMessage)m_messageCaptor.getValue()).getName()); }