### Question:
AdminUserServiceImpl implements AdminUserService { @Override public Response updateUser(UserDto userDto, HttpHeaders headers) { LOGGER.info("UPDATE USER: " + userDto.toString()); HttpEntity requestEntity = new HttpEntity(userDto, headers); ResponseEntity<Response> re = restTemplate.exchange( USER_SERVICE_IP_URI, HttpMethod.PUT, requestEntity, Response.class); return re.getBody(); }  @Override Response getAllUsers(HttpHeaders headers); @Override Response deleteUser(String userId, HttpHeaders headers); @Override Response updateUser(UserDto userDto, HttpHeaders headers); @Override Response addUser(UserDto userDto, HttpHeaders headers);  }### Answer:
@Test public void testUpdateUser() { UserDto userDto = new UserDto(); HttpEntity requestEntity2 = new HttpEntity(userDto, headers); Response response = new Response<>(); ResponseEntity<Response> re = new ResponseEntity<>(response, HttpStatus.OK); Mockito.when(restTemplate.exchange( "http: HttpMethod.PUT, requestEntity2, Response.class)).thenReturn(re); Response result = adminUserServiceImpl.updateUser(userDto, headers); Assert.assertEquals(new Response<>(null, null, null), result); }