### Question:
Rows { public void add( String option, String description ) { add( new Row( option, description ) ); } Rows( int overallWidth, int columnSeparatorWidth ); void add( String option, String description ); void reset(); void fitToWidth(); String render();  }### Answer:
@Test public void optionsAndDescriptionsWithinOverallWidth() { Rows rows = new Rows( 40, 2 ); rows.add( "left one", "right one" ); rows.add( "another left one", "another right one" ); assertRows( rows, "left one right one ", "another left one another right one" ); }
@Test public void someOptionsExceedOverallWidth() { Rows rows = new Rows( 40, 2 ); rows.add( "left one is pretty freaking long to be over here", "right one" ); rows.add( "another left one also has length that is quite excessive", "another right one" ); assertRows( rows, "left one is pretty right one ", " freaking long to ", " be over here ", "another left one another right one", " also has length ", " that is quite ", " excessive " ); }
@Test public void someDescriptionsExceedOverallWidth() { Rows rows = new Rows( 40, 2 ); rows.add( "left one", "right one for the time we have chosen" ); rows.add( "another left one", "another right one could be used here instead" ); assertRows( rows, "left one right one for the ", " time we have chosen", "another left one another right one ", " could be used here ", " instead " ); }