@Test
public void testFindRouteTypeForRoute() throws Exception {

    getCamelContext().addRoutes(new AbstractBasicRoute() {
        @Override
        protected void doConfigure() throws Exception {
            from("direct:inputRoute")
                    .routeId("inputTestRouteOne")
                    .log("TestRoute");
            from("direct:inputUri")
                    .routeId("inputTestRouteTwo")
                    .log("TestRoute");
            from("direct:outputRoute")
                    .routeId("outputTestRouteOne")
                    .log("TestRoute");
        }
    });
    assertThat(routeTypeUriResolver.findRouteType(
                    new RouteTypeInfo(getCamelContext().getRoute("inputTestRouteOne"), null, null, null)),
            is(RouteTypeEnum.INPUT));
    assertThat(routeTypeUriResolver.findRouteType(
                    new RouteTypeInfo(getCamelContext().getRoute("inputTestRouteTwo"), null, null, null)),
            is(RouteTypeEnum.INPUT));
    assertThat(routeTypeUriResolver.findRouteType(
                    new RouteTypeInfo(getCamelContext().getRoute("outputTestRouteOne"), null, null, null)),
            nullValue());
    assertThat(routeTypeUriResolver.findRouteType(new RouteTypeInfo(null, null, null,
            getCamelContext().getRouteDefinition("inputTestRouteOne"))), is(RouteTypeEnum.INPUT));
    assertThat(routeTypeUriResolver.findRouteType(new RouteTypeInfo(null, null, null,
            getCamelContext().getRouteDefinition("inputTestRouteTwo"))), is(RouteTypeEnum.INPUT));
    assertThat(routeTypeUriResolver.findRouteType(new RouteTypeInfo(null, null, null,
            getCamelContext().getRouteDefinition("outputTestRouteOne"))), nullValue());
}