### Question:
PhaserServiceBarrier implements IServiceBarrier { @Override public boolean isAvailable() { return phaser.getUnarrivedParties() <= 0; } PhaserServiceBarrier( );  PhaserServiceBarrier( String serviceId ); @Override int hold(); @Override int release(); @Override int getHoldCount(); @Override boolean isAvailable(); @Override int awaitAvailability(); @Override void terminate(); @Override boolean isTerminated();  }### Answer:
@Test public void testIsAvailable() throws Exception { assertTrue( barrier.isAvailable() ); barrier.hold(); barrier.hold(); assertFalse( barrier.isAvailable() ); barrier.release(); assertFalse( barrier.isAvailable() ); barrier.release(); assertTrue( barrier.isAvailable() ); }