question: private static int calculateDelayForError ( ) { return random . nextInt ( DELAY_MS * ERROR_DELAY_FACTOR ) ; }
target:  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.