private static int calculateDelayForError(){
  return random.nextInt(DELAY_MS * ERROR_DELAY_FACTOR);
}

private static int calculateDelayForError ( ) { return random . nextInt ( DELAY_MS * ERROR_DELAY_FACTOR ) ; }
get the delay ( in milliseconds ) that should be used for triggering a network error . < p / > because we are triggering an error , use a random delay between 0 and three times the normal network delay to simulate a flaky connection failing anywhere from quickly to slowly .
