@Test
public void testNoUnnecessaryStateCopiesCreated() {

	final Pattern<Event, Event> pattern = Pattern.<Event>begin("start").where(startFilter)
		.notFollowedBy("not").where(startFilter)
		.followedBy("oneOrMore").where(startFilter).oneOrMore()
		.followedBy("end").where(endFilter);
	final NFACompiler.NFAFactoryCompiler<Event> nfaFactoryCompiler = new NFACompiler.NFAFactoryCompiler<>(pattern);
	nfaFactoryCompiler.compileFactory();
	int endStateCount = 0;
	for (State<Event> state : nfaFactoryCompiler.getStates()) {
		if (state.getName().equals("end")) {
			endStateCount++;
		}
	}
	assertEquals(1, endStateCount);
}