### Question:
AdminRouteServiceImpl implements AdminRouteService { @Override public Response createAndModifyRoute(RouteInfo request, HttpHeaders headers) { HttpEntity requestEntity = new HttpEntity(request, headers); ResponseEntity<Response<Route>> re = restTemplate.exchange( "http: HttpMethod.POST, requestEntity, new ParameterizedTypeReference<Response<Route>>() { }); return re.getBody(); }  @Override Response getAllRoutes(HttpHeaders headers); @Override Response createAndModifyRoute(RouteInfo request, HttpHeaders headers); @Override Response deleteRoute(String routeId, HttpHeaders headers);  }### Answer:
@Test public void testCreateAndModifyRoute() { RouteInfo request = new RouteInfo(); HttpEntity requestEntity2 = new HttpEntity(request, headers); ResponseEntity<Response<Route>> re2 = new ResponseEntity<>(response, HttpStatus.OK); Mockito.when(restTemplate.exchange( "http: HttpMethod.POST, requestEntity2, new ParameterizedTypeReference<Response<Route>>() { })).thenReturn(re2); Response result = adminRouteServiceImpl.createAndModifyRoute(request, headers); Assert.assertEquals(new Response<>(null, null, null), result); }