### Question:
StationServiceImpl implements StationService { @Override public Response queryForIdBatch(List<String> nameList, HttpHeaders headers) { ArrayList<String> result = new ArrayList<>(); for (int i = 0; i < nameList.size(); i++) { Station station = repository.findByName(nameList.get(i)); if (station == null) { result.add("Not Exist"); } else { result.add(station.getId()); } } if (!result.isEmpty()) { return new Response<>(1, success, result); } else { return new Response<>(0, "No content according to name list", null); } }  @Override Response create(Station station, HttpHeaders headers); @Override boolean exist(String stationName, HttpHeaders headers); @Override Response update(Station info, HttpHeaders headers); @Override Response delete(Station info, HttpHeaders headers); @Override Response query(HttpHeaders headers); @Override Response queryForId(String stationName, HttpHeaders headers); @Override Response queryForIdBatch(List<String> nameList, HttpHeaders headers); @Override Response queryById(String stationId, HttpHeaders headers); @Override Response queryByIdBatch(List<String> idList, HttpHeaders headers);  }### Answer:
@Test public void testQueryForIdBatch1() { List<String> nameList = new ArrayList<>(); Response result = stationServiceImpl.queryForIdBatch(nameList, headers); Assert.assertEquals(new Response<>(0, "No content according to name list", null), result); }
@Test public void testQueryForIdBatch2() { List<String> nameList = new ArrayList<>(); nameList.add("station_name"); Mockito.when(repository.findByName(Mockito.anyString())).thenReturn(null); Response result = stationServiceImpl.queryForIdBatch(nameList, headers); Assert.assertEquals("Success", result.getMsg()); }