CAMEL-7856 Fixed the test error with JDK7