### Question:
BarrierImplementation implements Barrier, BarrierGroup.Listener { @Override public String getName() { return m_barrierGroup.getName(); } BarrierImplementation(BarrierGroup group,
                               BarrierIdentity.Factory identityFactory); @Override void await(); @Override boolean await(long timeout, TimeUnit unit); @Override boolean await(long timeout); @Override void awaken(Set<BarrierIdentity> waiters); @Override void cancel(); @Override String getName();  }### Answer:
@Test public void testGetGroupName() throws Exception { final BarrierImplementation b = new BarrierImplementation(m_barrierGroup, m_identityFactory); when(m_barrierGroup.getName()).thenReturn("mygroup"); assertEquals("mygroup", b.getName()); }