JdbcWrapper { static boolean isHashCodeMethod(Object methodName, Object[] args) { return "hashCode" == methodName && (args == null || args.length == 0); } private  JdbcWrapper(Counter sqlCounter); static int getUsedConnectionCount(); static int getActiveConnectionCount(); static long getTransactionCount(); static int getActiveThreadCount(); static int getRunningBuildCount(); static int getBuildQueueLength(); static long getBuildQueueWaitingDurationsSum(); static List<ConnectionInformations> getConnectionInformationsList(); Counter getSqlCounter(); static int getMaxConnectionCount(); static Map<String, Map<String, Object>> getBasicDataSourceProperties(); static Map<String, DataSource> getJndiAndSpringDataSources(); static void registerSpringDataSource(String name, DataSource dataSource); DataSource createDataSourceProxy(DataSource dataSource); DataSource createDataSourceProxy(String name, final DataSource dataSource); Connection createConnectionProxy(Connection connection); static final JdbcWrapper SINGLETON; }
@Test public void testIsHashCodeMethod() { assertTrue("isHashCodeMethod1", JdbcWrapper.isHashCodeMethod("hashCode", new Object[] {})); assertTrue("isHashCodeMethod2", JdbcWrapper.isHashCodeMethod("hashCode", null)); assertFalse("isHashCodeMethod3", JdbcWrapper.isHashCodeMethod("nothashCode", new Object[] {})); assertFalse("isHashCodeMethod4", JdbcWrapper.isHashCodeMethod("hashCode", new Object[] { "" })); }