@Test
public void testRealFiles() throws Exception {

	// Load the resources
	File f = TestUtils.findTestFile( "/textactions/indentation-correct.txt" );
	String correct = Utils.readFileContent( f );
	f = TestUtils.findTestFile( "/textactions/indentation-incorrect.txt" );
	String incorrect = Utils.readFileContent( f );
	// "incorrect" should be "correct" after fixing the indentation
	CorrectIndentationAction action = new CorrectIndentationAction();
	Assert.assertEquals( correct, action.update( incorrect, 0, incorrect.length()));
	// Fixing the indentation should be idem-potent
	Assert.assertEquals( correct, action.update( correct, 0, correct.length()));
	// Format the "c1" component only
	Assert.assertEquals(
			// The same section has not the same length in both files
			correct.substring( 0, 44 ) + incorrect.substring( 45 ),
			action.update( incorrect, 0, 45 ));
	// Format all the instances
	Assert.assertEquals(
			incorrect.substring( 0, 45 ) + correct.substring( 44 ),
			action.update( incorrect, 45, 5000 ));
	// Format the beginning of the "c2" instance
	Assert.assertEquals(
			incorrect.substring( 0, 65 ) + correct.substring( 64, 64 + 50 ) + incorrect.substring( 117 ),
			action.update( incorrect, 65, 51 ));
}