private void awaitTermination(){
  try {
    executor.awaitTermination(400,TimeUnit.MILLISECONDS);
  }
 catch (  final Exception e) {
    throw new RuntimeException(e);
  }
}

private void awaitTermination ( ) { try { executor . awaitTermination ( 400 , TimeUnit . MILLISECONDS ) ; } catch ( final Exception e ) { throw new RuntimeException ( e ) ; } }
await for executor termination
