### Question:
HttpRequestAnnotationScenarioMapper extends AbstractScenarioMapper implements ScenarioListAware { @Override protected String getMappingKey(Message request) { if (request instanceof HttpMessage) { return getMappingKeyForHttpMessage((HttpMessage) request); } return super.getMappingKey(request); }  List<SimulatorScenario> getScenarios(); void setScenarios(List<SimulatorScenario> scenarios); @Override void setScenarioList(List<SimulatorScenario> scenarioList); SimulatorConfigurationProperties getConfiguration(); void setConfiguration(SimulatorConfigurationProperties configuration);  }### Answer:
@Test public void testGetMappingKey() { scenarioMapper.setScenarioList(Arrays.asList(new IssueScenario(), new FooScenario(), new GetFooScenario(), new PutFooScenario(), new OtherScenario())); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/foo")), "FooScenario"); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/foo").method(HttpMethod.GET)), "GetFooScenario"); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/foo").method(HttpMethod.PUT)), "PutFooScenario"); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/other")), "OtherScenario"); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/bar").method(HttpMethod.GET)), "IssueScenario"); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/bar").method(HttpMethod.DELETE)), "IssueScenario"); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/bar").method(HttpMethod.PUT)), "default"); Assert.assertEquals(scenarioMapper.getMappingKey(new HttpMessage().path("/issues/bar")), "default"); Assert.assertEquals(scenarioMapper.getMappingKey(null), "default"); scenarioMapper.setUseDefaultMapping(false); Assert.assertThrows(CitrusRuntimeException.class, () -> scenarioMapper.getMappingKey(new HttpMessage().path("/issues/bar").method(HttpMethod.PUT))); Assert.assertThrows(CitrusRuntimeException.class, () -> scenarioMapper.getMappingKey(new HttpMessage().path("/issues/bar"))); Assert.assertThrows(CitrusRuntimeException.class, () -> scenarioMapper.getMappingKey(null)); }