public static String rightPad( String ret, int limit ) {
    if ( ret == null ) {
      return rightPad( new StringBuilder(), limit );
    } else {
      return rightPad( new StringBuilder( ret ), limit );
    }
  }
@Test
  public void testRightPad() {
    final String s = "Pad me baby one more time";

    assertEquals( "     ", Const.rightPad( (String) null, 5 ) );
    assertEquals( "Pad", Const.rightPad( s, 3 ) );

    final StringBuffer sb = new StringBuffer( s );
    assertEquals( s + "   ", Const.rightPad( sb, 28 ) );
    assertEquals( "Pad me baby", Const.rightPad( sb, 11 ) );

    final StringBuilder sb2 = new StringBuilder( s );
    assertEquals( s + "   ", Const.rightPad( sb2, 28 ) );
    assertEquals( "Pad me baby", Const.rightPad( sb2, 11 ) );
  }