### Question:
AdminOrderServiceImpl implements AdminOrderService { @Override public Response deleteOrder(String orderId, String trainNumber, HttpHeaders headers) { Response deleteOrderResult; if (trainNumber.startsWith("G") || trainNumber.startsWith("D")) { AdminOrderServiceImpl.LOGGER.info("[Admin Order Service][Delete Order]"); HttpEntity requestEntity = new HttpEntity(headers); ResponseEntity<Response> re = restTemplate.exchange( "http: HttpMethod.DELETE, requestEntity, Response.class); deleteOrderResult = re.getBody(); } else { AdminOrderServiceImpl.LOGGER.info("[Admin Order Service][Delete Order Other]"); HttpEntity requestEntity = new HttpEntity(headers); ResponseEntity<Response> re = restTemplate.exchange( "http: HttpMethod.DELETE, requestEntity, Response.class); deleteOrderResult = re.getBody(); } return deleteOrderResult; }  @Override Response getAllOrders(HttpHeaders headers); @Override Response deleteOrder(String orderId, String trainNumber, HttpHeaders headers); @Override Response updateOrder(Order request, HttpHeaders headers); @Override Response addOrder(Order request, HttpHeaders headers);  }### Answer:
@Test public void testDeleteOrder1() { 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 = adminOrderService.deleteOrder("orderId", "G", headers); Assert.assertEquals(new Response<>(null, null, null), result); }
@Test public void testDeleteOrder2() { 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 = adminOrderService.deleteOrder("orderId", "K", headers); Assert.assertEquals(new Response<>(null, null, null), result); }