List of usage examples for org.apache.commons.dbutils QueryRunner getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.mule.transport.jdbc.config.JdbcNamespaceHandlerTestCase.java
@Test public void testEndpointQueryOverride() throws Exception { JdbcConnector c = (JdbcConnector) muleContext.getRegistry().lookupConnector("jdbcConnector3"); ImmutableEndpoint testJdbcEndpoint = muleContext.getEndpointFactory() .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()); }