FeatureBackend { public String getFeatureName() { return featureName; } FeatureBackend(Feature feature);  FeatureBackend(Feature feature, Map<String, Object> arg); ScenarioContext getContext(); String getFeatureName(); ScriptValueMap handle(ScriptValueMap args, Scenario scenario); List<FeatureScenarioMatch> getMatchingScenarios(ScriptValueMap args); Scenario getDefaultScenario(ScriptValueMap args); HttpResponse corsCheck(HttpRequest request, long startTime); HttpResponse buildResponse(HttpRequest request, long startTime, Scenario scenario, ScriptValueMap args);  }
@Test public void testMultipleServerFeatures() { Feature feature = FeatureParser.parse(FileUtils.getFileRelativeTo(getClass(), "server.feature")); Feature feature2 = FeatureParser.parse(FileUtils.getFileRelativeTo(getClass(), "server-path-matching.feature")); FeaturesBackend backend = new FeaturesBackend(new Feature[]{feature, feature2}); Match match = new Match() .text(ScriptValueMap.VAR_REQUEST_URI, "/v10/cats") .text(ScriptValueMap.VAR_REQUEST_METHOD, "GET"); FeatureBackend.FeatureScenarioMatch matchingInfo = backend.getMatchingScenario(match.vars()); Assert.assertNotNull(matchingInfo.getFeatureBackend()); Assert.assertNotNull(matchingInfo.getScenario()); Assert.assertEquals("server-path-matching.feature", matchingInfo.getFeatureBackend().getFeatureName()); Assert.assertThat(matchingInfo.getScenario().getName(), containsString("/v10/cats")); }