JdbcWrapper { static boolean isEqualsMethod(Object methodName, Object[] args) { return "equals" == methodName && args != null && args.length == 1; } 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 testIsEqualsMethod() { assertTrue("isEqualsMethod1", JdbcWrapper.isEqualsMethod(EQUALS, new Object[] { "" })); assertFalse("isEqualsMethod2", JdbcWrapper.isEqualsMethod("notequals", new Object[] { "" })); assertFalse("isEqualsMethod3", JdbcWrapper.isEqualsMethod(EQUALS, null)); assertFalse("isEqualsMethod4", JdbcWrapper.isEqualsMethod(EQUALS, new Object[] { "", "" })); }