Buggy code:
public class RestTemplateIntegrationTests { private RestTemplate template ; private static Server jettyServer ; private static String helloWorld = "Héllo<seq2seq4repair_space>Wörld" ; private static final String URI = "http:////localhost:8889" ; private static MediaType contentType ; @ BeforeClass public static void startJettyServer ( ) throws Exception { } @ Before public void createTemplate ( ) { } @ AfterClass public static void stopJettyServer ( ) throws Exception { } @ Test public void getString ( ) { } @ Test public void getEntity ( ) { } @ Test public void getNoResponse ( ) { } @ Test public void postForLocation ( ) throws URISyntaxException { } @ Test public void postForLocationEntity ( ) throws URISyntaxException { } @ Test public void postForObject ( ) throws URISyntaxException { } @ Test ( expected = HttpClientErrorException . class ) public void notFound ( ) { } @ Test ( expected = HttpServerErrorException . class ) public void serverError ( ) { } @ Test public void optionsForAllow ( ) throws URISyntaxException { } @ Test public void uri ( ) throws InterruptedException , URISyntaxException { String result = template . getForObject ( ( ( RestTemplateIntegrationTests . URI ) + "//uri//{query}" ) , String . class , "Zürich" ) ; <START_BUG> assertEquals ( "Invalid<seq2seq4repair_space>request<seq2seq4repair_space>URI" , "//uri//Z%FCrich" , result ) ; <END_BUG> result = template . getForObject ( ( ( RestTemplateIntegrationTests . URI ) + "//uri//query={query}" ) , String . class , "foo@bar" ) ; assertEquals ( "Invalid<seq2seq4repair_space>request<seq2seq4repair_space>URI" , "//uri//query=foo@bar" , result ) ; } @ Test public void multipart ( ) throws UnsupportedEncodingException { } @ Test public void exchangeGet ( ) throws Exception { } @ Test public void exchangePost ( ) throws Exception { } private static class ErrorServlet extends GenericServlet { private final int sc ; private ErrorServlet ( int sc ) { } @ Override public void service ( ServletRequest request , ServletResponse response ) throws IOException , ServletException { } } private static class GetServlet extends HttpServlet { private final byte [ ] buf ; private final MediaType contentType ; private GetServlet ( byte [ ] buf , MediaType contentType ) { } @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } } private static class PostServlet extends HttpServlet { private final String s ; private final String location ; private final byte [ ] buf ; private final MediaType contentType ; private PostServlet ( String s , String location , byte [ ] buf , MediaType contentType ) { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } } private static class UriServlet extends HttpServlet { @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } } private static class MultipartServlet extends HttpServlet { @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } } }

Fix:
assertEquals ( "Invalid<seq2seq4repair_space>request<seq2seq4repair_space>URI" , "//uri//Z%C3%BCrich" , result ) ;