Added JUnit test for  consistency checking..