System.exit will stop the jvm and hence the testing. We can just use Assert.fail();