private String getActual ( String actual , double timeTook ) { if ( timeTook > 0 ) { String lowercase = actual . substring ( 0 , 1 ) . toLowerCase ( ) ; actual = "After waiting for " + timeTook + " seconds, " + lowercase + actual . substring ( 1 ) ; } return actual ; }
Helper to recordStep which takes in some result and appends a time waited if appropriate . If timeTook is greater than zero some time was waited along with the action and the returned result will reflect that