assertStepNameNotRegistered(stepRegistry, jobName, "fsdfsdfsdfsd");
}
@Test
public void registerTwice() throws DuplicateJobException {
final StepRegistry stepRegistry = createRegistry();
final String jobName = "myJob";
final Collection<Step> stepsFirstRegistration = getStepCollection(
createStep("myStep"),
createStep("myOtherStep"),
createStep("myThirdStep")
);
// first registration
launchRegisterGetRegistered(stepRegistry, jobName, stepsFirstRegistration);
// Second registration with same name should fail
try {
stepRegistry.register(jobName, getStepCollection(
createStep("myFourthStep"),
createStep("lastOne")));
fail("Should have failed with a "+DuplicateJobException.class.getSimpleName());
} catch (DuplicateJobException e) {
// OK