@Test public void shouldCreateStepFromTableValuesWhenHeadersDoNotMatchParameterNames() throws Exception { AnnotationNamedParameterSteps steps = new AnnotationNamedParameterSteps(); // I speak LolCatz and mispell headerz namedParameters.put("itz", "first"); namedParameters.put("ntz", "ground"); String patternAsString = "I live on the ith floor but some call it the nth"; Method method = stepMethodFor( "methodWithNamedParametersInNaturalOrder", AnnotationNamedParameterSteps.class); StepCandidate candidate = candidateWith(patternAsString, WHEN, method, steps); String stepAsString = "When I live on the <ith> floor but some call it the <nth>"; Step step = candidate.createMatchedStep(stepAsString, namedParameters); StepResult perform = step.perform(null); assertThat(perform, instanceOf(AbstractStepResult.Pending.class)); assertThat(perform.parametrisedStep(), equalTo(stepAsString)); StepResult doNotPerform = step.doNotPerform(null); assertThat(doNotPerform, instanceOf(NotPerformed.class)); assertThat(doNotPerform.parametrisedStep(), equalTo(stepAsString)); }