### Question:
AdminUserServiceImpl implements AdminUserService { @Override public Response deleteUser(String userId, HttpHeaders headers) { HttpEntity requestEntity = new HttpEntity(headers); ResponseEntity<Response> re = restTemplate.exchange( USER_SERVICE_IP_URI + "/" + userId, HttpMethod.DELETE, 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 testDeleteUser() { Response response = new Response<>(); ResponseEntity<Response> re = new ResponseEntity<>(response, HttpStatus.OK); Mockito.when(restTemplate.exchange( "http: HttpMethod.DELETE, requestEntity, Response.class)).thenReturn(re); Response result = adminUserServiceImpl.deleteUser("userId", headers); Assert.assertEquals(new Response<>(null, null, null), result); }