METHOD_0 ( ) { java . lang . String input = STRING_0 ; java . lang . String [ ] from = new java . lang . String [ ] { STRING_1 } ; java . lang . String [ ] to = new java . lang . String [ ] { STRING_2 } ; METHOD_1 ( ) . when ( IDENT_0 ) . replace ( anyString ( ) , any ( java . lang . String [ ] . class ) , any ( java . lang . String [ ] . class ) ) ; java . lang . String actual = IDENT_0 . replace ( input , from , to ) ; java . lang . String expected = STRING_3 ; "<AssertPlaceHolder>" ; } replace ( java . lang . String , java . lang . String [ ] , java . lang . String [ ] ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( string ) ; for ( int e = 0 ; e < ( java . lang . Math . min ( IDENT_1 . length , IDENT_2 . length ) ) ; e ++ ) { java . lang . String IDENT_3 = IDENT_1 [ e ] ; java . lang . String IDENT_4 = IDENT_2 [ e ] ; int IDENT_5 = builder . indexOf ( IDENT_3 , 0 ) ; while ( IDENT_5 != ( - 1 ) ) { builder . replace ( IDENT_5 , ( IDENT_5 + ( IDENT_3 . length ( ) ) ) , IDENT_4 ) ; IDENT_5 = builder . indexOf ( IDENT_3 , ( IDENT_5 + ( IDENT_4 . length ( ) ) ) ) ; } } return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( actual , expected )