@Test
public void compile(){

	String regex = "[";
	try {
		RegExUtil.compile(regex, null);
		fail();
	} catch(EvaluationException ee){
		Throwable cause = ee.getCause();
		assertEquals(null, ee.getContext());
		assertTrue(cause instanceof PatternSyntaxException);
	}
	TextIndex textIndex = new TextIndex();
	try {
		RegExUtil.compile("[", textIndex);
		fail();
	} catch(EvaluationException ee){
		Throwable cause = ee.getCause();
		assertEquals(textIndex, ee.getContext());
		assertTrue(cause instanceof PatternSyntaxException);
	}
}