@Override
	public void apply(ProcessRoutersRequest request, PolarisRouterContext routerContext) {
		//1. get feature env router label key
		String envLabelKey = routerContext.getLabel(LABEL_KEY_FEATURE_ENV_ROUTER_KEY);
		if (StringUtils.isBlank(envLabelKey)) {
			envLabelKey = DEFAULT_FEATURE_ENV_ROUTER_LABEL;
		}

		//2. get feature env router label value
		String envLabelValue = routerContext.getLabel(envLabelKey);
		if (envLabelValue == null) {
			// router to base env when not matched feature env
			envLabelValue = NOT_EXISTED_ENV;
		}

		//3. set env metadata to router request
		Set<RouteArgument> routeArguments = new HashSet<>(1);
		routeArguments.add(RouteArgument.buildCustom(envLabelKey, envLabelValue));

		request.putRouterArgument(MetadataRouter.ROUTER_TYPE_METADATA, routeArguments);


		//4. set failover type to others
		request.setMetadataFailoverType(MetadataFailoverType.METADATAFAILOVERNOTKEY);
	}
@Test
	public void testDefaultRouterKey() {
		Map<String, String> labels = new HashMap<>();
		labels.put("featureenv", "blue");
		PolarisRouterContext routerContext = new PolarisRouterContext();
		routerContext.putLabels(RouterConstant.ROUTER_LABELS, labels);

		ProcessRoutersRequest request = new ProcessRoutersRequest();
		ServiceInstances serviceInstances = new DefaultServiceInstances(Mockito.mock(ServiceKey.class), new ArrayList<>());
		request.setDstInstances(serviceInstances);

		FeatureEnvRouterRequestInterceptor interceptor = new FeatureEnvRouterRequestInterceptor();

		interceptor.apply(request, routerContext);

		Map<String, String> metadataRouterLabels = request.getRouterMetadata().get(MetadataRouter.ROUTER_TYPE_METADATA);
		assertThat(metadataRouterLabels.size()).isEqualTo(1);
		assertThat(metadataRouterLabels.get("featureenv")).isEqualTo("blue");
	}