}
public void testEndpointQueryOverride() throws Exception
{
JdbcConnector c = (JdbcConnector) muleContext.getRegistry().lookupConnector("jdbcConnector3");
ImmutableEndpoint testJdbcEndpoint = muleContext.getRegistry()
.lookupEndpointFactory()
.getInboundEndpoint("testJdbcEndpoint");
//On connector, not overridden
assertNotNull(c.getQuery(testJdbcEndpoint, "getTest"));
//On connector, overridden on endpoint
assertNotNull(c.getQuery(testJdbcEndpoint, "getTest2"));
assertEquals("OVERRIDDEN VALUE", c.getQuery(testJdbcEndpoint, "getTest2"));
//Only on endpoint
assertNotNull(c.getQuery(testJdbcEndpoint, "getTest3"));
//Does not exist on either
assertNull(c.getQuery(testJdbcEndpoint, "getTest4"));
assertEquals("3", testJdbcEndpoint.getProperty("queryTimeout"));
QueryRunner queryRunner = c.getQueryRunnerFor(testJdbcEndpoint);
assertEquals(ExtendedQueryRunner.class, queryRunner.getClass());
assertEquals(3, ((ExtendedQueryRunner) queryRunner).getQueryTimeout());
}