### Question:
OrderOtherServiceImpl implements OrderOtherService { @Override public Response queryOrdersForRefresh(QueryInfo qi, String accountId, HttpHeaders headers) { ArrayList<Order> orders = queryOrders(qi, accountId, headers).getData(); ArrayList<String> stationIds = new ArrayList<>(); for (Order order : orders) { stationIds.add(order.getFrom()); stationIds.add(order.getTo()); } List<String> names = queryForStationId(stationIds, headers); for (int i = 0; i < orders.size(); i++) { orders.get(i).setFrom(names.get(i * 2)); orders.get(i).setTo(names.get(i * 2 + 1)); } return new Response<>(1, success, orders); }  @Override Response getSoldTickets(Seat seatRequest, HttpHeaders headers); @Override Response findOrderById(UUID id, HttpHeaders headers); @Override Response create(Order order, HttpHeaders headers); @Override void initOrder(Order order, HttpHeaders headers); @Override Response alterOrder(OrderAlterInfo oai, HttpHeaders headers); @Override Response<ArrayList<Order>> queryOrders(QueryInfo qi, String accountId, HttpHeaders headers); @Override Response queryOrdersForRefresh(QueryInfo qi, String accountId, HttpHeaders headers); List<String> queryForStationId(List<String> ids, HttpHeaders headers); @Override Response saveChanges(Order order, HttpHeaders headers); @Override Response cancelOrder(UUID accountId, UUID orderId, HttpHeaders headers); @Override Response queryAlreadySoldOrders(Date travelDate, String trainNumber, HttpHeaders headers); @Override Response getAllOrders(HttpHeaders headers); @Override Response modifyOrder(String orderId, int status, HttpHeaders headers); @Override Response getOrderPrice(String orderId, HttpHeaders headers); @Override Response payOrder(String orderId, HttpHeaders headers); @Override Response getOrderById(String orderId, HttpHeaders headers); @Override Response checkSecurityAboutOrder(Date dateFrom, String accountId, HttpHeaders headers); @Override Response deleteOrder(String orderId, HttpHeaders headers); @Override Response addNewOrder(Order order, HttpHeaders headers); @Override Response updateOrder(Order order, HttpHeaders headers);  }### Answer:
@Test public void testQueryOrdersForRefresh() { ArrayList<Order> list = new ArrayList<>(); Mockito.when(orderOtherRepository.findByAccountId(Mockito.any(UUID.class))).thenReturn(list); Response<List<String>> response = new Response<>(); ResponseEntity<Response<List<String>>> re = new ResponseEntity<>(response, HttpStatus.OK); Mockito.when(restTemplate.exchange( Mockito.anyString(), Mockito.any(HttpMethod.class), Mockito.any(HttpEntity.class), Mockito.any(ParameterizedTypeReference.class) )).thenReturn(re); QueryInfo qi = new QueryInfo(); qi.setEnableStateQuery(false); qi.setEnableBoughtDateQuery(false); qi.setEnableTravelDateQuery(false); Response result = orderOtherServiceImpl.queryOrdersForRefresh(qi, UUID.randomUUID().toString(), headers); Assert.assertEquals("Success", result.getMsg()); }