### Question:
RouteFilter extends AbstractFilter { List<ServiceInfo> extractTargetGroupFromScrollId(PallasRequest req) throws ExecutionException { String reqBody = req.getBodyStrForPost(); if (StringUtils.isEmpty(reqBody)) { return emptyList(); } int scrollIdIdx = reqBody.indexOf("\"scroll_id\""); if (scrollIdIdx == -1) { return emptyList(); } int firstQuoIdx = reqBody.indexOf('\"', scrollIdIdx+12); int secondQuoIdx = reqBody.indexOf('\"', firstQuoIdx+1); if (firstQuoIdx == -1 || secondQuoIdx == -1) { return emptyList(); } String scrollId = reqBody.substring(firstQuoIdx+1, secondQuoIdx); Long targetGroupId = 0L; try { targetGroupId = Long.valueOf(scrollId.substring(scrollId.indexOf('[')+1, scrollId.indexOf(']'))); } catch (Exception e) { LogUtils.error(logger, SearchLogEvent.NORMAL_EVENT, e.getMessage(), e); throw new HttpCodeErrorPallasException("cannot find [targetGroupId] in the Scroll Request", HTTP_SERVICE_UNAVAILABLE, className, classMethod); } byte[] fixContent = reqBody.replace(scrollId, scrollId.substring(0, scrollId.indexOf('['))).getBytes(); req.setFixScrollRequestContent(fixContent); IndexRoutingTargetGroup targetGroup = PallasCacheFactory.getCacheService().getTargetGroupById(targetGroupId); String name = targetGroup.getIndexName(); List<String> availableNodes; if (IndexRouting.ROUTE_TYPE_INDEX.equals(targetGroup.getType())) { availableNodes = PallasCacheFactory.getCacheService().getAvailableNodesByIndex(name); } else { availableNodes = PallasCacheFactory.getCacheService().getAvailableNodesByCluster(name); } List<IndexRouting.ConditionTarget> list = Collections.singletonList(new IndexRouting.ConditionTarget(targetGroupId, 1)); return parseTargetGroup(name, availableNodes, list, req); }  @Override String name(); @Override void run(AbstractFilterContext filterContext, SessionContext sessionContext); List<ServiceInfo> genShardLevelRoutingServerList(String indexName, IndexRouting.ConditionTarget target,
			IndexRoutingTargetGroup targetGroup, PallasRequest req,
			List<IndexRoutingTargetGroup.ClusterInfo> clusterInfoList, List<String> availableNodes); static String DEFAULT_NAME; static String className; static String classMethod; }### Answer:
@Test public void testExtractTargetGroupFromScrollId() throws ExecutionException { fakeBodyStrForPost = ""; List<ServiceInfo> serviceInfos = filter.extractTargetGroupFromScrollId(testReq); assertEquals(serviceInfos.size(), 0); fakeBodyStrForPost = "not_exist_scroll_id"; serviceInfos = filter.extractTargetGroupFromScrollId(testReq); assertEquals(serviceInfos.size(), 0); fakeBodyStrForPost = "{\n" + "\t\"scroll_id\" : \"aaaaabbbbbcccccddddd[1]\",\n" + "\t\"scoll\":\"1m\"\n" + "}"; Exception ex = null; try { serviceInfos = filter.extractTargetGroupFromScrollId(testReq); }catch (Exception e) { e.printStackTrace(); ex = e; } assertNotNull(ex); fakeBodyStrForPost = "{\n" + "\t\"scroll_id\" : \"aaaaabbbbbcccccddddd[1]\",\n" + "\t\"scoll\":\"1m\"\n" + "}"; ex = null; try { serviceInfos = filter.extractTargetGroupFromScrollId(testReq); }catch (Exception e) { ex = e; } }