CAMEL-14273: Fixed test
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java
index 0a2d36a..6b74123 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java
@@ -24,10 +24,7 @@
import java.util.Date;
import java.util.Set;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.FailedToCreateRouteException;
-import org.apache.camel.ResolveEndpointFailedException;
+import org.apache.camel.*;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.Before;
@@ -101,7 +98,9 @@
fail("Expected FailedToCreateRouteException");
} catch (FailedToCreateRouteException e) {
assertIsInstanceOf(ResolveEndpointFailedException.class, e.getCause());
- IllegalArgumentException iae = assertIsInstanceOf(IllegalArgumentException.class, e.getCause().getCause());
+ PropertyBindingException pbe = assertIsInstanceOf(PropertyBindingException.class, e.getCause().getCause());
+ assertEquals("chmod", pbe.getPropertyName());
+ IllegalArgumentException iae = assertIsInstanceOf(IllegalArgumentException.class, pbe.getCause());
assertEquals("chmod option [abc] is not valid", iae.getMessage());
}
}