Fixed the camel-core test error in JDK8