### Question:
ServiceBarrierManager implements IServiceBarrierManager { @Override public IServiceBarrier getServiceBarrier( String serviceID ) { if ( barriers.containsKey( serviceID ) ) { return barriers.get( serviceID ); } PhaserServiceBarrier phaserServiceBarrier = new PhaserServiceBarrier( serviceID ); barriers.put( serviceID, phaserServiceBarrier ); return phaserServiceBarrier; }  @Override IServiceBarrier getServiceBarrier( String serviceID ); @Override List<IServiceBarrier> getAllServiceBarriers();  }### Answer:
@Test public void testGetServiceBarrier() throws Exception { IServiceBarrier barrier1a = manager.getServiceBarrier( "1" ); assertSame( barrier1, barrier1a ); assertNotSame( barrier1, barrier2 ); }